summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-12-27 12:03:54 +0300
committerkx <kx@radix.pro>2023-12-27 12:03:54 +0300
commitb4181f47a42ca45ebd2f33216d0b18f08a3bb55c (patch)
treeac2ca93c783abe53befa460afd5e57e14e02b6d4
parente3fc425e5fff3f469c8684c3ab65f54c9c6a5db2 (diff)
downloadsources-b4181f47a42ca45ebd2f33216d0b18f08a3bb55c.tar.xz
libnfs-5.0.2
-rw-r--r--packages/l/Makefile1
-rw-r--r--packages/l/libnfs/Makefile63
2 files changed, 64 insertions, 0 deletions
diff --git a/packages/l/Makefile b/packages/l/Makefile
index a5d95d8..abd734b 100644
--- a/packages/l/Makefile
+++ b/packages/l/Makefile
@@ -88,6 +88,7 @@ SUBDIRS := aalib \
libmd \
libmng \
libmtp \
+ libnfs \
libnvme \
libpipeline \
libpng \
diff --git a/packages/l/libnfs/Makefile b/packages/l/libnfs/Makefile
new file mode 100644
index 0000000..fde90b9
--- /dev/null
+++ b/packages/l/libnfs/Makefile
@@ -0,0 +1,63 @@
+#
+# Project Home:
+# ============
+# https://github.com/sahlberg/libnfs
+#
+# Clone:
+# =====
+# git clone https://github.com/sahlberg/libnfs.git
+#
+
+url = https://github.com/sahlberg
+
+repo_name = libnfs
+pkg_name = libnfs
+suffix = tar.xz
+
+versions = 5.0.2
+
+git_repo = .git_clone
+tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for version in $(versions) ; do \
+ tag=libnfs-`echo $$version` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \
+ xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+ tar xJf $(pkg_name)-$$version.$(suffix) ; \
+ ( cd $(pkg_name)-$$version ; ./bootstrap ; rm -rf autom4te.cache .git* *~ ) ; \
+ tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+ rm -rf $(pkg_name)-$$version ; \
+ fi ; \
+ done
+
+$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)