Sources

The Tree of Radix and Third Party Sources

1388 Commits   0 Branches   11 Tags
author: kx <kx@radix.pro> 2022-01-25 09:03:47 +0300 committer: kx <kx@radix.pro> 2022-01-25 09:03:47 +0300 commit: 43c59ccc7012522441b627c04fd24ca56b025da6 parent: 788605e03d844d91a676393fc350c7e6ac79c288
Commit Summary:
Download cyrus-sasl release tarballs
Diffstat:
2 files changed, 88 insertions, 48 deletions
diff --git a/packages/n/cyrus-sasl/Makefile b/packages/n/cyrus-sasl/Makefile
index 742a111..dfa8771 100644
--- a/packages/n/cyrus-sasl/Makefile
+++ b/packages/n/cyrus-sasl/Makefile
@@ -1,80 +1,51 @@
 #
+#
 # Project Home:
 # ============
-# https://www.cyrusimap.org
+#   https://www.cyrusimap.org/sasl
 #
 # Github:
 # ======
-# git clone https://github.com/cyrusimap/cyrus-sasl.git
+#   git clone https://github.com/cyrusimap/cyrus-sasl
 #
 # Downloads:
 # =========
-# https://github.com/cyrusimap/cyrus-sasl/releases
+#   https://github.com/cyrusimap/cyrus-sasl/releases
+#   https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.27/cyrus-sasl-2.1.27.tar.gz
+#
+# NOTE:
+#   Git snapshot doesn't contains man pages.
 #
 
-url        = https://github.com/cyrusimap
+url        = https://github.com/cyrusimap/cyrus-sasl/releases/download
+
 
-repo_name  = cyrus-sasl
+versions   = 2.1.26 2.1.27
 pkg_name   = cyrus-sasl
 suffix     = tar.xz
 
-#
-# List of revisions to be extracted:
-# =================================
-#
-#                                               hash | version
-#            ----------------------------------------+--------
-revisions  = 0189425cc210555c36383293c468df5da73acc48:2.1.27
-
-git_repo   = .git_clone
-
-versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
-tarballs   = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
+tarballs   = $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions)))
 sha1s      = $(addsuffix .sha1sum, $(tarballs))
 
-TARGETS = repository_clean
-
 
-all: $(TARGETS)
+all: $(tarballs) $(sha1s)
 
-.PHONY: downloads_clean repository_clean
+.PHONY: downloads_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 revision in $(revisions) ; do \
-	  hash=`echo $$revision | cut -f 1 -d ':'` ; \
-	  version=`echo $$revision | cut -f 2 -d ':'` ; \
-	  if [ ! -f $(pkg_name)-$$version.$(suffix) ]; then \
-	    echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
-	    ( cd $(repo_name) && \
-	      git archive --format=tar --prefix=$(pkg_name)-$$version/ $$hash | \
-	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
-	  fi ; \
-	  tar xJf $(pkg_name)-$$version.$(suffix) ; \
-	  ( cd $(pkg_name)-$$version ; \
-	    NOCONFIGURE=yes ./autogen.sh ; \
-	    rm -rf autom4te.cache .gitignore .travis.yml ; \
-	    find . -type f -name '.gitignore' -exec rm -f {} \; ; \
-	    find . -type f -name '.cvsignore' -exec rm -f {} \; ) ; \
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for version in $(versions) ; do \
+	  wget -N $(url)/$(pkg_name)-$$version/$(pkg_name)-$$version.tar.gz ;  \
+	  tar xzf $(pkg_name)-$$version.tar.gz ; \
 	  tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
-	  rm -rf $(pkg_name)-$$version ; \
+	  rm -rf $(pkg_name)-$$version $(pkg_name)-$$version.tar.gz ; \
 	done
 
-$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
 	@for tarball in $< ; do \
-	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
 	  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)
diff --git a/packages/n/cyrus-sasl/Makefile.snapshots b/packages/n/cyrus-sasl/Makefile.snapshots
new file mode 100644
index 0000000..742a111
--- /dev/null
+++ b/packages/n/cyrus-sasl/Makefile.snapshots
@@ -0,0 +1,80 @@
+#
+# Project Home:
+# ============
+# https://www.cyrusimap.org
+#
+# Github:
+# ======
+# git clone https://github.com/cyrusimap/cyrus-sasl.git
+#
+# Downloads:
+# =========
+# https://github.com/cyrusimap/cyrus-sasl/releases
+#
+
+url        = https://github.com/cyrusimap
+
+repo_name  = cyrus-sasl
+pkg_name   = cyrus-sasl
+suffix     = tar.xz
+
+#
+# List of revisions to be extracted:
+# =================================
+#
+#                                               hash | version
+#            ----------------------------------------+--------
+revisions  = 0189425cc210555c36383293c468df5da73acc48:2.1.27
+
+git_repo   = .git_clone
+
+versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+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 revision in $(revisions) ; do \
+	  hash=`echo $$revision | cut -f 1 -d ':'` ; \
+	  version=`echo $$revision | cut -f 2 -d ':'` ; \
+	  if [ ! -f $(pkg_name)-$$version.$(suffix) ]; then \
+	    echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
+	    ( cd $(repo_name) && \
+	      git archive --format=tar --prefix=$(pkg_name)-$$version/ $$hash | \
+	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+	  fi ; \
+	  tar xJf $(pkg_name)-$$version.$(suffix) ; \
+	  ( cd $(pkg_name)-$$version ; \
+	    NOCONFIGURE=yes ./autogen.sh ; \
+	    rm -rf autom4te.cache .gitignore .travis.yml ; \
+	    find . -type f -name '.gitignore' -exec rm -f {} \; ; \
+	    find . -type f -name '.cvsignore' -exec rm -f {} \; ) ; \
+	  tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+	  rm -rf $(pkg_name)-$$version ; \
+	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)