Radix cross Linux 3pp sources

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

423 Commits   0 Branches   0 Tags
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  1) #
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  2) # Wiki:
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  3) # ====
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  4) # https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  5) #
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  6) # GitHub:
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  7) # ======
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  8) # https://github.com/foss-for-synopsys-dwc-arc-processors
cbda8cd8 (kx 2023-04-06 10:27:37 +0300  9) #
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 10) # Clone:
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 11) # =====
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 12) # git clone https://github.com/foss-for-synopsys-dwc-arc-processors/uClibc.git
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 13) #
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 14) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 15) url        = https://github.com/foss-for-synopsys-dwc-arc-processors
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 16) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 17) repo_name  = uClibc
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 18) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 19) #
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 20) # List of tags to be extracted:
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 21) # ============================
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 22) #                                               hash | tag
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 23) #            ----------------------------------------+-----
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 24) revisions  = 1a50fd884758ec5b5d8a163a704819fbf1760f99:arc-2016.09.17
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 25) revisions += 955c69353480923792ad03023ebf34b574591be9:arc-2018.03.18
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 26) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 27) git_repo   = .git_clone
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 28) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 29) suffix     = tar.xz
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 30) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 31) versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 32) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 33) tarballs   = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 34) sha1s      = $(addsuffix .sha1sum, $(tarballs))
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 35) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 36) TARGETS = repository_clean
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 37) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 38) all: $(TARGETS)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 39) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 40) .PHONY: downloads_clean repository_clean
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 41) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 42) $(git_repo):
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 43) 	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 44) 	@rm -rf $(repo_name)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 45) 	@git clone $(url)/$(repo_name).git $(repo_name)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 46) 	@touch $@
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 47) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 48) $(tarballs): $(git_repo)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 49) 	@for revision in $(revisions) ; do \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 50) 	  hash=`echo $$revision    | cut -f 1 -d ':'` ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 51) 	  version=`echo $$revision | cut -f 2 -d ':'` ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 52) 	  if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 53) 	    echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 54) 	    ( cd $(repo_name) && \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 55) 	      git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 56) 	      xz >../$(repo_name)-$$version.$(suffix) ) ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 57) 	  fi ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 58) 	done
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 59) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 60) $(sha1s): %.$(suffix).sha1sum : %.$(suffix)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 61) 	@for tarball in $< ; do \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 62) 	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 63) 	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 64) 	done
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 65) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 66) repository_clean: $(sha1s)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 67) 	@echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 68) 	@rm -rf $(git_repo) $(repo_name)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 69) 
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 70) downloads_clean:
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 71) 	@rm -rf $(tarballs) $(sha1s)
cbda8cd8 (kx 2023-04-06 10:27:37 +0300 72) 	@rm -rf $(git_repo) $(repo_name)