Radix cross Linux 3pp sources

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

365 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2024-10-01 11:02:49 +0300 committer: kx <kx@radix.pro> 2024-10-01 11:02:49 +0300 commit: 549325dcce9839508178db867dbf8d1b0dd5b7f6 parent: c5f97acb93184700d3c174c96932b46d2a8f732b
Commit Summary:
zlib-1.3.1
Diffstat:
1 file changed, 13 insertions, 3 deletions
diff --git a/packages/l/zlib/Makefile b/packages/l/zlib/Makefile
index 060d4a3..74638ed 100644
--- a/packages/l/zlib/Makefile
+++ b/packages/l/zlib/Makefile
@@ -11,11 +11,12 @@
 url         = https://zlib.net
 
 versions    = 1.2.13
+current     = 1.3.1
 
 pkgname     = zlib
 suffix      = tar.xz
 
-tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions) $(current)))
 sha1s       = $(addsuffix .sha1sum, $(tarballs))
 
 
@@ -26,8 +27,17 @@ all: $(tarballs) $(sha1s)
 $(tarballs):
 	@echo -e "\n======= Downloading source tarballs =======\n"
 	@for tarball in $(tarballs) ; do \
-	  version=`echo $$tarball | sed 's/\([a-zA-Z-]*\)\(.*\)\(.tar.xz\)/\2/'` ; \
-	  wget -N $(url)/$$tarball ; \
+	  version=`echo $${tarball} | sed 's/\([a-zA-Z-]*\)\(.*\)\(.tar.xz\)/\2/'` ; \
+	  if [ "$${version}" = "$(current)" ] ; then \
+	    wget -N $(url)/$${tarball} ; \
+	  else \
+	    if [ ! -f "$${tarball}" -a ! -f "$${tarball%.${suffix}}.tar.gz" ] ; then \
+	      wget $(url)/fossils/$${tarball%.${suffix}}.tar.gz ; \
+	      tar -xzf $${tarball%.${suffix}}.tar.gz ; \
+	      tar -cJf $(pkgname)-$${version}.$(suffix) $(pkgname)-$${version} ; \
+	      rm -rf $(pkgname)-$${version} $${tarball%.${suffix}}.tar.gz ; \
+	    fi ; \
+	  fi ; \
 	done
 
 $(sha1s): %.$(suffix).sha1sum : %.$(suffix)