318ce0f7 (kx 2023-09-28 15:54:15 +0300 1) #
318ce0f7 (kx 2023-09-28 15:54:15 +0300 2) # Project Home:
318ce0f7 (kx 2023-09-28 15:54:15 +0300 3) # ============
318ce0f7 (kx 2023-09-28 15:54:15 +0300 4) # https://pipewire.org
318ce0f7 (kx 2023-09-28 15:54:15 +0300 5) #
318ce0f7 (kx 2023-09-28 15:54:15 +0300 6) # Downloads:
318ce0f7 (kx 2023-09-28 15:54:15 +0300 7) # =========
318ce0f7 (kx 2023-09-28 15:54:15 +0300 8) # https://gitlab.freedesktop.org/pipewire
318ce0f7 (kx 2023-09-28 15:54:15 +0300 9) #
318ce0f7 (kx 2023-09-28 15:54:15 +0300 10) # GitLab:
318ce0f7 (kx 2023-09-28 15:54:15 +0300 11) # ======
318ce0f7 (kx 2023-09-28 15:54:15 +0300 12) # https://gitlab.freedesktop.org/pipewire/pipewire
318ce0f7 (kx 2023-09-28 15:54:15 +0300 13) #
318ce0f7 (kx 2023-09-28 15:54:15 +0300 14) # Clone:
318ce0f7 (kx 2023-09-28 15:54:15 +0300 15) # =====
318ce0f7 (kx 2023-09-28 15:54:15 +0300 16) # git clone https://gitlab.freedesktop.org/pipewire/pipewire.git
318ce0f7 (kx 2023-09-28 15:54:15 +0300 17) #
318ce0f7 (kx 2023-09-28 15:54:15 +0300 18)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 19) url = https://gitlab.freedesktop.org/pipewire
318ce0f7 (kx 2023-09-28 15:54:15 +0300 20)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 21) repo_name = pipewire
318ce0f7 (kx 2023-09-28 15:54:15 +0300 22) pkg_name = pipewire
318ce0f7 (kx 2023-09-28 15:54:15 +0300 23) suffix = tar.xz
318ce0f7 (kx 2023-09-28 15:54:15 +0300 24)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 25) versions = 0.3.80
318ce0f7 (kx 2023-09-28 15:54:15 +0300 26)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 27) git_repo = .git_clone
318ce0f7 (kx 2023-09-28 15:54:15 +0300 28) tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
318ce0f7 (kx 2023-09-28 15:54:15 +0300 29) sha1s = $(addsuffix .sha1sum, $(tarballs))
318ce0f7 (kx 2023-09-28 15:54:15 +0300 30)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 31) TARGETS = repository_clean
318ce0f7 (kx 2023-09-28 15:54:15 +0300 32)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 33)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 34) all: $(TARGETS)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 35)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 36) .PHONY: downloads_clean repository_clean
318ce0f7 (kx 2023-09-28 15:54:15 +0300 37)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 38) $(git_repo):
318ce0f7 (kx 2023-09-28 15:54:15 +0300 39) @echo -e "\n======= Clone $(repo_name).git repository =======\n"
318ce0f7 (kx 2023-09-28 15:54:15 +0300 40) @rm -rf $(repo_name)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 41) @git clone $(url)/$(repo_name).git $(repo_name)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 42) @touch $@
318ce0f7 (kx 2023-09-28 15:54:15 +0300 43)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 44) $(tarballs): $(git_repo)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 45) @for version in $(versions) ; do \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 46) tag=`echo $$version` ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 47) if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 48) echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 49) ( cd $(repo_name) && \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 50) git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 51) xz >../$(pkg_name)-$$version.$(suffix) ) ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 52) tar xJf $(pkg_name)-$$version.$(suffix) ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 53) ( cd $(pkg_name)-$$version ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 54) rm -rf .git* .codespell-ignore .editorconfig *~ ) ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 55) tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 56) rm -rf $(pkg_name)-$$version ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 57) fi ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 58) done
318ce0f7 (kx 2023-09-28 15:54:15 +0300 59)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 60) $(sha1s): %.tar.xz.sha1sum : %.tar.xz
318ce0f7 (kx 2023-09-28 15:54:15 +0300 61) @for tarball in $< ; do \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 62) echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 63) sha1sum --binary $$tarball > $$tarball.sha1sum ; \
318ce0f7 (kx 2023-09-28 15:54:15 +0300 64) done
318ce0f7 (kx 2023-09-28 15:54:15 +0300 65)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 66) repository_clean: $(sha1s)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 67) @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
318ce0f7 (kx 2023-09-28 15:54:15 +0300 68) @rm -rf $(git_repo) $(repo_name)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 69)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 70) downloads_clean:
318ce0f7 (kx 2023-09-28 15:54:15 +0300 71) @rm -rf $(tarballs) $(sha1s)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 72) @rm -rf $(git_repo) $(repo_name)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 73)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 74)
318ce0f7 (kx 2023-09-28 15:54:15 +0300 75)