Radix cross Linux 3pp sources

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

468 Commits   0 Branches   0 Tags   |
0c7772dd (kx 2023-04-11 07:23:53 +0300  1) #
0c7772dd (kx 2023-04-11 07:23:53 +0300  2) # Project Home:
0c7772dd (kx 2023-04-11 07:23:53 +0300  3) # ============
0c7772dd (kx 2023-04-11 07:23:53 +0300  4) #   https://github.com/fedora-sysv/initscripts
0c7772dd (kx 2023-04-11 07:23:53 +0300  5) #
0c7772dd (kx 2023-04-11 07:23:53 +0300  6) # Clone:
0c7772dd (kx 2023-04-11 07:23:53 +0300  7) # =====
0c7772dd (kx 2023-04-11 07:23:53 +0300  8) #   git clone https://github.com/fedora-sysv/initscripts.git initscripts
0c7772dd (kx 2023-04-11 07:23:53 +0300  9) #
0c7772dd (kx 2023-04-11 07:23:53 +0300 10) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 11) url        = https://github.com/fedora-sysv
0c7772dd (kx 2023-04-11 07:23:53 +0300 12) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 13) repo_name  = initscripts
0c7772dd (kx 2023-04-11 07:23:53 +0300 14) pkg_name   = function-src
0c7772dd (kx 2023-04-11 07:23:53 +0300 15) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 16) suffix     = tar.xz
0c7772dd (kx 2023-04-11 07:23:53 +0300 17) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 18) #
0c7772dd (kx 2023-04-11 07:23:53 +0300 19) # List of tags to be extracted:
0c7772dd (kx 2023-04-11 07:23:53 +0300 20) #
0c7772dd (kx 2023-04-11 07:23:53 +0300 21) TAGS       = r8-53
0c7772dd (kx 2023-04-11 07:23:53 +0300 22) TAGS      += r8-54
0c7772dd (kx 2023-04-11 07:23:53 +0300 23) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 24) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 25) git_repo   = .git_clone
0c7772dd (kx 2023-04-11 07:23:53 +0300 26) versions   = $(foreach tag, $(TAGS), $(shell echo $(tag) | sed 's/r//g' | sed 's/\-/./g'))
0c7772dd (kx 2023-04-11 07:23:53 +0300 27) tarballs   = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
0c7772dd (kx 2023-04-11 07:23:53 +0300 28) tarballs  += $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions)))
0c7772dd (kx 2023-04-11 07:23:53 +0300 29) sha1s      = $(addsuffix .sha1sum, $(tarballs))
0c7772dd (kx 2023-04-11 07:23:53 +0300 30) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 31) TARGETS = repository_clean
0c7772dd (kx 2023-04-11 07:23:53 +0300 32) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 33) all: $(TARGETS)
0c7772dd (kx 2023-04-11 07:23:53 +0300 34) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 35) .PHONY: downloads_clean repository_clean
0c7772dd (kx 2023-04-11 07:23:53 +0300 36) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 37) $(git_repo):
0c7772dd (kx 2023-04-11 07:23:53 +0300 38) 	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
0c7772dd (kx 2023-04-11 07:23:53 +0300 39) 	@rm -rf $(repo_name)
0c7772dd (kx 2023-04-11 07:23:53 +0300 40) 	@git clone $(url)/$(repo_name).git $(repo_name)
0c7772dd (kx 2023-04-11 07:23:53 +0300 41) 	@touch $@
0c7772dd (kx 2023-04-11 07:23:53 +0300 42) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 43) $(tarballs): $(git_repo)
0c7772dd (kx 2023-04-11 07:23:53 +0300 44) 	@for tag in $(TAGS) ; do \
0c7772dd (kx 2023-04-11 07:23:53 +0300 45) 	  version=`echo $$tag | sed 's/r//g' | sed 's/\-/./g'` ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 46) 	  if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
0c7772dd (kx 2023-04-11 07:23:53 +0300 47) 	    echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 48) 	    ( cd $(repo_name) && \
0c7772dd (kx 2023-04-11 07:23:53 +0300 49) 	      git archive --format=tar --prefix=$(repo_name)-$$version/ $$tag | \
0c7772dd (kx 2023-04-11 07:23:53 +0300 50) 	      xz >../$(repo_name)-$$version.$(suffix) ) ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 51) 	  fi ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 52) 	  tar xJf $(repo_name)-$$version.$(suffix) ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 53) 	  mkdir -p $(pkg_name)-$$version/rc.d/init.d ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 54) 	  ( cd $(repo_name)-$$version/src ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 55) 	    for file in consoletype.1 consoletype.c fstab-decode.8 fstab-decode.c \
0c7772dd (kx 2023-04-11 07:23:53 +0300 56) 	                initlog.1 initlog.c initlog.h process.c process.h usleep.1 usleep.c ; do \
0c7772dd (kx 2023-04-11 07:23:53 +0300 57) 	      cp -a $$file ../../$(pkg_name)-$$version ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 58) 	    done ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 59) 	    cp -a ../rc.d/init.d/functions ../../$(pkg_name)-$$version/rc.d/init.d ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 60) 	  ) ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 61) 	  tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 62) 	  rm -rf $(repo_name)-$$version $(pkg_name)-$$version ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 63) 	done
0c7772dd (kx 2023-04-11 07:23:53 +0300 64) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 65) $(sha1s): %.$(suffix).sha1sum : %.$(suffix)
0c7772dd (kx 2023-04-11 07:23:53 +0300 66) 	@for tarball in $< ; do \
0c7772dd (kx 2023-04-11 07:23:53 +0300 67) 	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 68) 	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
0c7772dd (kx 2023-04-11 07:23:53 +0300 69) 	done
0c7772dd (kx 2023-04-11 07:23:53 +0300 70) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 71) repository_clean: $(sha1s)
0c7772dd (kx 2023-04-11 07:23:53 +0300 72) 	@echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
0c7772dd (kx 2023-04-11 07:23:53 +0300 73) 	@rm -rf $(git_repo) $(repo_name)
0c7772dd (kx 2023-04-11 07:23:53 +0300 74) 
0c7772dd (kx 2023-04-11 07:23:53 +0300 75) downloads_clean:
0c7772dd (kx 2023-04-11 07:23:53 +0300 76) 	@rm -rf $(tarballs) $(sha1s)
0c7772dd (kx 2023-04-11 07:23:53 +0300 77) 	@rm -rf $(git_repo) $(repo_name)