Radix cross Linux 3pp sources

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

343 Commits   0 Branches   0 Tags
c9b87548 (kx 2023-04-06 16:08:32 +0300  1) #
c9b87548 (kx 2023-04-06 16:08:32 +0300  2) # Project Home:
c9b87548 (kx 2023-04-06 16:08:32 +0300  3) # ============
c9b87548 (kx 2023-04-06 16:08:32 +0300  4) # https://www.gnu.org/software/make
c9b87548 (kx 2023-04-06 16:08:32 +0300  5) #
c9b87548 (kx 2023-04-06 16:08:32 +0300  6) # Git:
c9b87548 (kx 2023-04-06 16:08:32 +0300  7) # ===
c9b87548 (kx 2023-04-06 16:08:32 +0300  8) # http://git.savannah.gnu.org/cgit/make.git/
c9b87548 (kx 2023-04-06 16:08:32 +0300  9) #
c9b87548 (kx 2023-04-06 16:08:32 +0300 10) # Clone:
c9b87548 (kx 2023-04-06 16:08:32 +0300 11) # =====
c9b87548 (kx 2023-04-06 16:08:32 +0300 12) # git clone https://git.savannah.gnu.org/git/make.git
c9b87548 (kx 2023-04-06 16:08:32 +0300 13) #
c9b87548 (kx 2023-04-06 16:08:32 +0300 14) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 15) url        = https://git.savannah.gnu.org/git
c9b87548 (kx 2023-04-06 16:08:32 +0300 16) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 17) repo_name  = make
c9b87548 (kx 2023-04-06 16:08:32 +0300 18) pkg_name   = make
c9b87548 (kx 2023-04-06 16:08:32 +0300 19) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 20) #
c9b87548 (kx 2023-04-06 16:08:32 +0300 21) # List of upstream versions to be extracted:
c9b87548 (kx 2023-04-06 16:08:32 +0300 22) # =========================================
c9b87548 (kx 2023-04-06 16:08:32 +0300 23) #                                               hash | tag | gnulib revision
c9b87548 (kx 2023-04-06 16:08:32 +0300 24) #            ----------------------------------------+-----+----------------------------------------
c9b87548 (kx 2023-04-06 16:08:32 +0300 25) revisions  = c5319e75f5b64c972a38967a6eb5747838e914fd:4.3.1:363497c93a59235478cd80d536a17023e595cc79
71f1ed4d (kx 2024-02-24 14:22:05 +0300 26) revisions += d66a65ad5a0e31b287f53930b0f09e31801f1613:4.4.1:f95c23370c4acca67e7d2bc3013d454ac79eee69
c9b87548 (kx 2023-04-06 16:08:32 +0300 27) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 28) git_repo   = .git_clone
c9b87548 (kx 2023-04-06 16:08:32 +0300 29) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 30) suffix     = tar.xz
c9b87548 (kx 2023-04-06 16:08:32 +0300 31) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 32) versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
c9b87548 (kx 2023-04-06 16:08:32 +0300 33) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 34) tarballs   = $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions)))
c9b87548 (kx 2023-04-06 16:08:32 +0300 35) sha1s      = $(addsuffix .sha1sum, $(tarballs))
c9b87548 (kx 2023-04-06 16:08:32 +0300 36) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 37) TARGETS = repository_clean
c9b87548 (kx 2023-04-06 16:08:32 +0300 38) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 39) all: $(TARGETS)
c9b87548 (kx 2023-04-06 16:08:32 +0300 40) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 41) .PHONY: downloads_clean repository_clean
c9b87548 (kx 2023-04-06 16:08:32 +0300 42) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 43) $(git_repo):
c9b87548 (kx 2023-04-06 16:08:32 +0300 44) 	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
c9b87548 (kx 2023-04-06 16:08:32 +0300 45) 	@rm -rf $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 46) 	@git clone $(url)/$(repo_name).git $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 47) 	@touch $@
c9b87548 (kx 2023-04-06 16:08:32 +0300 48) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 49) $(tarballs): $(git_repo)
c9b87548 (kx 2023-04-06 16:08:32 +0300 50) 	@for revision in $(revisions) ; do \
c9b87548 (kx 2023-04-06 16:08:32 +0300 51) 	  hash=`echo $$revision    | cut -f 1 -d ':'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 52) 	  version=`echo $$revision | cut -f 2 -d ':'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 53) 	  gnulib=`echo $$revision  | cut -f 3 -d ':'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 54) 	  if [ ! -f $(pkg_name)-$$version.$(suffix) ]; then \
c9b87548 (kx 2023-04-06 16:08:32 +0300 55) 	    echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 56) 	    ( cd $(repo_name) && \
c9b87548 (kx 2023-04-06 16:08:32 +0300 57) 	      git archive --format=tar --prefix=$(pkg_name)-$$version/ $$hash | \
c9b87548 (kx 2023-04-06 16:08:32 +0300 58) 	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 59) 	  fi ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 60) 	  tar xJf $(pkg_name)-$$version.$(suffix) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 61) 	  ( cd $(pkg_name)-$$version ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 62) 	    sed -i "s,\[[0-9]\.[0-9]\.[0-9]*\],\[$$version\]," configure.ac ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 63) 	    GNULIB_REVISION=$$gnulib ./bootstrap --force --copy ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 64) 	    rm -rf autom4te.cache gl gnulib scripts .ccls .dir-locals.el ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 65) 	    find . -type f -name *~ -exec rm -f {} \; ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 66) 	    find . -type f -name '.gitignore' -exec rm -f {} \; ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 67) 	  ) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 68) 	  tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 69) 	  rm -rf $(pkg_name)-$$version ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 70) 	done
c9b87548 (kx 2023-04-06 16:08:32 +0300 71) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 72) $(sha1s): %.$(suffix).sha1sum : %.$(suffix)
c9b87548 (kx 2023-04-06 16:08:32 +0300 73) 	@for tarball in $< ; do \
c9b87548 (kx 2023-04-06 16:08:32 +0300 74) 	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 75) 	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 76) 	done
c9b87548 (kx 2023-04-06 16:08:32 +0300 77) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 78) repository_clean: $(sha1s)
c9b87548 (kx 2023-04-06 16:08:32 +0300 79) 	@echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
c9b87548 (kx 2023-04-06 16:08:32 +0300 80) 	@rm -rf $(git_repo) $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 81) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 82) downloads_clean:
c9b87548 (kx 2023-04-06 16:08:32 +0300 83) 	@rm -rf $(tarballs) $(sha1s)
c9b87548 (kx 2023-04-06 16:08:32 +0300 84) 	@rm -rf $(git_repo) $(repo_name)