Radix cross Linux 3pp sources

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

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