Radix cross Linux 3pp sources

RcL sources – is a tree of Third Party and Radix source tarballs

388 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-12-26 13:53:40 +0300 committer: kx <kx@radix.pro> 2023-12-26 13:53:40 +0300 commit: fae7d5796c158e138053069fb6de9b0a799ec831 parent: 783c1acf4cb3ff16b7b7b4c50d7ca311ca1726eb
Commit Summary:
nss-mdns-0.15.1
Diffstat:
1 file changed, 43 insertions, 15 deletions
diff --git a/packages/n/nss-mdns/Makefile b/packages/n/nss-mdns/Makefile
index e1491fe..5ee2edd 100644
--- a/packages/n/nss-mdns/Makefile
+++ b/packages/n/nss-mdns/Makefile
@@ -1,39 +1,70 @@
 #
 # Project Home:
 # ============
-# http://0pointer.de/lennart/projects/nss-mdns
+#   http://0pointer.de/lennart/projects/nss-mdns
 #
 # Downloads:
 # =========
-# http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz
+#   http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz
 #
+# GitHub:
+# ======
+#   git clone https://github.com/avahi/nss-mdns.git
+#
+
+url        = https://github.com/avahi
+
+repo_name  = nss-mdns
+pkg_name   = nss-mdns
+suffix     = tar.xz
 
-url         = http://0pointer.de/lennart/projects/nss-mdns
+versions   = 0.15.1
 
-versions    = 0.10
+# List of tags to be extracted:
+TAGS       = $(addprefix v, $(versions))
 
-pkgname     = nss-mdns
-suffix      = tar.gz
+git_repo   = .git_clone
+tarballs   = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
+sha1s      = $(addsuffix .sha1sum, $(tarballs))
 
-tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
-sha1s       = $(addsuffix .sha1sum, $(tarballs))
+TARGETS = repository_clean
 
 
-all: $(tarballs) $(sha1s)
+all: $(TARGETS)
 
-.PHONY: downloads_clean
+.PHONY: downloads_clean repository_clean
 
-$(tarballs):
-	@echo -e "\n======= Downloading source tarballs =======\n"
+$(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 \
-	  wget -N $(url)/$(pkgname)-$$version.$(suffix) ;  \
+	  tag=v`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.sh ; make distclean ; rm -rf autom4te.cache src/.deps tests/.deps .git* .clang-format *~ ) ; \
+	    tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+	    rm -rf $(pkg_name)-$$version ; \
+	  fi ; \
 	done
 
-$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+$(sha1s): %.tar.xz.sha1sum : %.tar.xz
 	@for tarball in $< ; do \
-	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
+	  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)