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/grub
c9b87548 (kx 2023-04-06 16:08:32 +0300  5) #
c9b87548 (kx 2023-04-06 16:08:32 +0300  6) # Savannah cGit:
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/grub.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 git://git.savannah.gnu.org/grub.git
c9b87548 (kx 2023-04-06 16:08:32 +0300 13) # git clone https://git.savannah.gnu.org/git/grub.git
c9b87548 (kx 2023-04-06 16:08:32 +0300 14) # git clone ssh://git.savannah.gnu.org/srv/git/grub.git
c9b87548 (kx 2023-04-06 16:08:32 +0300 15) #
c9b87548 (kx 2023-04-06 16:08:32 +0300 16) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 17) url        = https://git.savannah.gnu.org/git/
c9b87548 (kx 2023-04-06 16:08:32 +0300 18) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 19) repo_name  = grub
c9b87548 (kx 2023-04-06 16:08:32 +0300 20) pkg_name   = grub
c9b87548 (kx 2023-04-06 16:08:32 +0300 21) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 22) #
c9b87548 (kx 2023-04-06 16:08:32 +0300 23) # List of tags to be extracted:
c9b87548 (kx 2023-04-06 16:08:32 +0300 24) # ============================
c9b87548 (kx 2023-04-06 16:08:32 +0300 25) #                                               hash | tag
c9b87548 (kx 2023-04-06 16:08:32 +0300 26) #            ----------------------------------------+-----
c9b87548 (kx 2023-04-06 16:08:32 +0300 27) revisions  = 2a2e10c1b39672de3d5da037a50d5c371f49b40d:2.04
c9b87548 (kx 2023-04-06 16:08:32 +0300 28) revisions += 837fe48deb89b31710904de4e9c7dda258490e1c:2.05.1
c9b87548 (kx 2023-04-06 16:08:32 +0300 29) revisions += c0e647eb0e2bd09315612446cb4d90f7f75cb44c:2.05.2
c9b87548 (kx 2023-04-06 16:08:32 +0300 30) revisions += ae94b97be2b81b625d6af6654d3ed79078b50ff6:2.06
c9b87548 (kx 2023-04-06 16:08:32 +0300 31) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 32) git_repo   = .git_clone
c9b87548 (kx 2023-04-06 16:08:32 +0300 33) suffix     = tar.xz
c9b87548 (kx 2023-04-06 16:08:32 +0300 34) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 35) versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
c9b87548 (kx 2023-04-06 16:08:32 +0300 36) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 37) tarballs   = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
c9b87548 (kx 2023-04-06 16:08:32 +0300 38) sha1s      = $(addsuffix .sha1sum, $(tarballs))
c9b87548 (kx 2023-04-06 16:08:32 +0300 39) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 40) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 41) TARGETS = repository_clean
c9b87548 (kx 2023-04-06 16:08:32 +0300 42) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 43) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 44) all: $(TARGETS)
c9b87548 (kx 2023-04-06 16:08:32 +0300 45) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 46) .PHONY: downloads_clean repository_clean
c9b87548 (kx 2023-04-06 16:08:32 +0300 47) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 48) $(git_repo):
c9b87548 (kx 2023-04-06 16:08:32 +0300 49) 	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
c9b87548 (kx 2023-04-06 16:08:32 +0300 50) 	@rm -rf $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 51) 	@git clone $(url)/$(repo_name).git $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 52) 	@touch $@
c9b87548 (kx 2023-04-06 16:08:32 +0300 53) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 54) $(tarballs): $(git_repo)
c9b87548 (kx 2023-04-06 16:08:32 +0300 55) 	@for revision in $(revisions) ; do \
c9b87548 (kx 2023-04-06 16:08:32 +0300 56) 	  hash=`echo $${revision}    | cut -f 1 -d ':'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 57) 	  version=`echo $${revision} | cut -f 2 -d ':'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 58) 	  if [ ! -f $(repo_name)-$${version}.$(suffix) ]; then \
c9b87548 (kx 2023-04-06 16:08:32 +0300 59) 	    echo -e "\n======= Creating '$(repo_name)-$${version}.$(suffix)' snapshot =======" ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 60) 	    ( cd $(repo_name) && \
c9b87548 (kx 2023-04-06 16:08:32 +0300 61) 	      git archive --format=tar --prefix=$(repo_name)-$${version}/ $${hash} | \
c9b87548 (kx 2023-04-06 16:08:32 +0300 62) 	      xz >../$(repo_name)-$${version}.$(suffix) ) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 63) 	  fi ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 64) 	  tar xJf $(pkg_name)-$${version}.$(suffix) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 65) 	  ( cd $(pkg_name)-$${version} ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 66) 	    # ======= Remove ~rc revision ======= ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 67) 	    echo -e "\n======= Remove ~rc (release candidate) micro version =======" ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 68) 	    rc=`echo $${version} | cut -f3 -d'.'` ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 69) 	    if [ "x$$rc" != "x" ] ; then \
c9b87548 (kx 2023-04-06 16:08:32 +0300 70) 	      sed -i "s,\[[0-9]\.[0-9][0-9]~rc[1-9a-z]*\],\[$${version}\]," configure.ac ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 71) 	    fi ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 72) 	    ./bootstrap ; rm -rf autom4te.cache .gitignore .travis.yml ) ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 73) 	  tar cJf $(pkg_name)-$${version}.$(suffix) $(pkg_name)-$${version} ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 74) 	  rm -rf $(pkg_name)-$${version} ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 75) 	done
c9b87548 (kx 2023-04-06 16:08:32 +0300 76) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 77) $(sha1s): %.$(suffix).sha1sum : %.$(suffix)
c9b87548 (kx 2023-04-06 16:08:32 +0300 78) 	@for tarball in $< ; do \
c9b87548 (kx 2023-04-06 16:08:32 +0300 79) 	  echo -e "\n======= Calculation the '$${tarball}' sha1sum =======" ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 80) 	  sha1sum --binary $${tarball} > $${tarball}.sha1sum ; \
c9b87548 (kx 2023-04-06 16:08:32 +0300 81) 	done
c9b87548 (kx 2023-04-06 16:08:32 +0300 82) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 83) repository_clean: $(sha1s)
c9b87548 (kx 2023-04-06 16:08:32 +0300 84) 	@echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
c9b87548 (kx 2023-04-06 16:08:32 +0300 85) 	@rm -rf $(git_repo) $(repo_name)
c9b87548 (kx 2023-04-06 16:08:32 +0300 86) 
c9b87548 (kx 2023-04-06 16:08:32 +0300 87) downloads_clean:
c9b87548 (kx 2023-04-06 16:08:32 +0300 88) 	@rm -rf $(tarballs) $(sha1s)
c9b87548 (kx 2023-04-06 16:08:32 +0300 89) 	@rm -rf $(git_repo) $(repo_name)