Radix cross Linux 3pp sources

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

343 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-04-06 16:08:32 +0300 committer: kx <kx@radix.pro> 2023-04-06 16:08:32 +0300 commit: c9b87548f19c4323592abff0a86bc1dac45658f0 parent: 8d07317ed20e7544501edfcc9894d5002fd1771d
Commit Summary:
GNU packages
Diffstat:
1 file changed, 54 insertions, 0 deletions
diff --git a/GNU/readline/Makefile b/GNU/readline/Makefile
new file mode 100644
index 0000000..ab06505
--- /dev/null
+++ b/GNU/readline/Makefile
@@ -0,0 +1,64 @@
+#
+# Project Home:
+# ============
+# https://www.gnu.org/software/bash/bash.html
+#
+# Downloads:
+# =========
+# https://ftp.cwru.edu/pub/bash/
+#
+
+url         = https://ftp.gnu.org/gnu/readline
+
+versions    = 6.2 6.3 8.0 8.1 8.2
+
+pkgname     = readline
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+patches     = $(addsuffix -patches.$(suffix), $(addprefix $(pkgname)-, $(versions)))
+
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(tarballs) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for version in $(versions) ; do \
+	  v=`echo $$version | sed 's,\.,,g'` ; \
+	  wget -N $(url)/$(pkgname)-$$version.$(suffix) ; \
+	  mkdir -p $(pkgname)-$$version-patches ; \
+	  cd $(pkgname)-$$version-patches ; \
+	  for file in `curl -s $(url)/$(pkgname)-$$version-patches/ | grep ">$(pkgname)[^<]*<" | sed 's,.*>\($(pkgname)[^<]*\)<.*,\1,'` ; do \
+	    wget -N $(url)/$(pkgname)-$$version-patches/$$file ; \
+	  done ; \
+	  if [ "" != "`find -iname '$(pkgname)*' -exec echo '{}' \; -quit`" ] ; then \
+	    cd .. ; \
+	    tar czf $(pkgname)-$$version-patches.$(suffix) $(pkgname)-$$version-patches ; \
+	    mv $(pkgname)-$$version-patches $(pkgname)-$$version-patched ; \
+	    tar xzf $(pkgname)-$$version.$(suffix) ; \
+	    ( cd $(pkgname)-$$version ; \
+	      for file in ../$(pkgname)-$$version-patched/$(pkgname)??-??? ; do patch -p0 --batch < $$file ; done \
+	    ) ; \
+	    mv $(pkgname)-$$version-patched $(pkgname)-$$version-patches ; \
+	    tar czf $(pkgname)-$$version.$(suffix) $(pkgname)-$$version ; \
+	    rm -rf $(pkgname)-$$version ; \
+	  else \
+	    cd .. ; \
+	  fi ; \
+	  rm -rf $(pkgname)-$$version-patches ; \
+	done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+	@for version in $(versions) ; do \
+	  echo -e "\n======= Calculation the '$(pkgname)-$$version.$(suffix)' sha1sum =======\n" ; \
+	  sha1sum --binary $(pkgname)-$$version.$(suffix) > $(pkgname)-$$version.$(suffix).sha1sum ; \
+	  if [ -f $(pkgname)-$$version-patches.$(suffix) ] ; then \
+	    sha1sum --binary $(pkgname)-$$version-patches.$(suffix) > $(pkgname)-$$version-patches.$(suffix).sha1sum ; \
+	  fi ; \
+	done
+
+downloads_clean:
+	@rm -rf *.$(suffix) *.sha1sum