b8086bfc (kx 2023-11-29 15:22:21 +0300 1) #
b8086bfc (kx 2023-11-29 15:22:21 +0300 2) # Project Home:
b8086bfc (kx 2023-11-29 15:22:21 +0300 3) # ============
b8086bfc (kx 2023-11-29 15:22:21 +0300 4) # https://invent.kde.org
b8086bfc (kx 2023-11-29 15:22:21 +0300 5) #
b8086bfc (kx 2023-11-29 15:22:21 +0300 6) # Clone:
b8086bfc (kx 2023-11-29 15:22:21 +0300 7) # =====
b8086bfc (kx 2023-11-29 15:22:21 +0300 8) # git clone https://invent.kde.org/plasma/khotkeys.git
b8086bfc (kx 2023-11-29 15:22:21 +0300 9) #
b8086bfc (kx 2023-11-29 15:22:21 +0300 10)
b8086bfc (kx 2023-11-29 15:22:21 +0300 11) url = https://invent.kde.org/plasma
b8086bfc (kx 2023-11-29 15:22:21 +0300 12)
b8086bfc (kx 2023-11-29 15:22:21 +0300 13) repo_name = khotkeys
b8086bfc (kx 2023-11-29 15:22:21 +0300 14) pkg_name = khotkeys
b8086bfc (kx 2023-11-29 15:22:21 +0300 15) suffix = tar.xz
b8086bfc (kx 2023-11-29 15:22:21 +0300 16)
b8086bfc (kx 2023-11-29 15:22:21 +0300 17) versions = 5.27.9
b8086bfc (kx 2023-11-29 15:22:21 +0300 18)
b8086bfc (kx 2023-11-29 15:22:21 +0300 19) # List of tags to be extracted:
b8086bfc (kx 2023-11-29 15:22:21 +0300 20) TAGS = $(addprefix v, $(versions))
b8086bfc (kx 2023-11-29 15:22:21 +0300 21)
b8086bfc (kx 2023-11-29 15:22:21 +0300 22) git_repo = .git_clone
b8086bfc (kx 2023-11-29 15:22:21 +0300 23) tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
b8086bfc (kx 2023-11-29 15:22:21 +0300 24) sha1s = $(addsuffix .sha1sum, $(tarballs))
b8086bfc (kx 2023-11-29 15:22:21 +0300 25)
b8086bfc (kx 2023-11-29 15:22:21 +0300 26) TARGETS = repository_clean
b8086bfc (kx 2023-11-29 15:22:21 +0300 27)
b8086bfc (kx 2023-11-29 15:22:21 +0300 28)
b8086bfc (kx 2023-11-29 15:22:21 +0300 29) all: $(TARGETS)
b8086bfc (kx 2023-11-29 15:22:21 +0300 30)
b8086bfc (kx 2023-11-29 15:22:21 +0300 31) .PHONY: downloads_clean repository_clean
b8086bfc (kx 2023-11-29 15:22:21 +0300 32)
b8086bfc (kx 2023-11-29 15:22:21 +0300 33) $(git_repo):
b8086bfc (kx 2023-11-29 15:22:21 +0300 34) @echo -e "\n======= Clone $(repo_name).git repository =======\n"
b8086bfc (kx 2023-11-29 15:22:21 +0300 35) @rm -rf $(repo_name)
b8086bfc (kx 2023-11-29 15:22:21 +0300 36) @git clone $(url)/$(repo_name).git $(repo_name)
b8086bfc (kx 2023-11-29 15:22:21 +0300 37) @touch $@
b8086bfc (kx 2023-11-29 15:22:21 +0300 38)
b8086bfc (kx 2023-11-29 15:22:21 +0300 39) $(tarballs): $(git_repo)
b8086bfc (kx 2023-11-29 15:22:21 +0300 40) @for version in $(versions) ; do \
b8086bfc (kx 2023-11-29 15:22:21 +0300 41) tag=v`echo $$version` ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 42) if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
b8086bfc (kx 2023-11-29 15:22:21 +0300 43) echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 44) ( cd $(repo_name) && \
b8086bfc (kx 2023-11-29 15:22:21 +0300 45) git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \
b8086bfc (kx 2023-11-29 15:22:21 +0300 46) xz >../$(pkg_name)-$$version.$(suffix) ) ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 47) fi ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 48) done
b8086bfc (kx 2023-11-29 15:22:21 +0300 49)
b8086bfc (kx 2023-11-29 15:22:21 +0300 50) $(sha1s): %.tar.xz.sha1sum : %.tar.xz
b8086bfc (kx 2023-11-29 15:22:21 +0300 51) @for tarball in $< ; do \
b8086bfc (kx 2023-11-29 15:22:21 +0300 52) echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 53) sha1sum --binary $$tarball > $$tarball.sha1sum ; \
b8086bfc (kx 2023-11-29 15:22:21 +0300 54) done
b8086bfc (kx 2023-11-29 15:22:21 +0300 55)
b8086bfc (kx 2023-11-29 15:22:21 +0300 56) repository_clean: $(sha1s)
b8086bfc (kx 2023-11-29 15:22:21 +0300 57) @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
b8086bfc (kx 2023-11-29 15:22:21 +0300 58) @rm -rf $(git_repo) $(repo_name)
b8086bfc (kx 2023-11-29 15:22:21 +0300 59)
b8086bfc (kx 2023-11-29 15:22:21 +0300 60) downloads_clean:
b8086bfc (kx 2023-11-29 15:22:21 +0300 61) @rm -rf $(tarballs) $(sha1s)
b8086bfc (kx 2023-11-29 15:22:21 +0300 62) @rm -rf $(git_repo) $(repo_name)