author: kx <kx@radix.pro> 2023-12-27 09:16:42 +0300
committer: kx <kx@radix.pro> 2023-12-27 09:16:42 +0300
commit: 120e8f405df0f03234d63fad31b9a2a8446b064f
parent: aa6a3c316b766498aa1dd20971bbde2e0224caba
Commit Summary:
Diffstat:
1 file changed, 43 insertions, 27 deletions
diff --git a/packages/a/udisks2/Makefile b/packages/a/udisks2/Makefile index 27241c7..5672eba 100644 --- a/packages/a/udisks2/Makefile +++ b/packages/a/udisks2/Makefile @@ -1,48 +1,66 @@ # # Project Home: # ============ -# https://www.freedesktop.org/wiki/Software/udisks +# https://github.com/storaged-project/udisks # -# Downloads: -# ========= -# https://udisks.freedesktop.org/releases +# Clone: +# ===== +# git clone https://github.com/storaged-project/udisks.git # -url = https://udisks.freedesktop.org/releases +url = https://github.com/storaged-project -versions = 2.1.0 2.1.3 2.1.4 2.1.5 2.1.6 2.1.8 +repo_name = udisks +pkg_name = udisks +suffix = tar.xz -pkg_name = udisks -suffix = tar.bz2 -sign_suffix = sign +versions = 2.10.1 -tarballs = $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions))) -signatures = $(addsuffix .$(sign_suffix), $(tarballs)) -sha1s = $(addsuffix .sha1sum, $(tarballs)) +# List of tags to be extracted: +TAGS = $(addprefix udisks-, $(versions)) +git_repo = .git_clone +tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions))) +sha1s = $(addsuffix .sha1sum, $(tarballs)) -all: $(tarballs) $(signatures) $(sha1s) +TARGETS = repository_clean -.PHONY: downloads_clean -$(tarballs): - @echo -e "\n======= Downloading source tarballs =======\n" - @for tarball in $(tarballs) ; do \ - wget -N $(url)/$$tarball ; \ - done +all: $(TARGETS) + +.PHONY: downloads_clean repository_clean -$(signatures): %.$(suffix).$(sign_suffix) : %.$(suffix) - @for signature in $@ ; do \ - echo -e "\n======= Downloading '$$signature' signature =======\n" ; \ - wget -N $(url)/$$signature ; \ - touch $$signature ; \ +$(git_repo): + @echo -e "\n======= Clone $(repo_name).git repository =======\n" + @rm -rf $(repo_name) + @git clone $(url)/$(repo_name).git $(repo_name) + @touch $@ + +$(tarballs): $(git_repo) + @for version in $(versions) ; do \ + tag=udisks-`echo $$version` ; \ + if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \ + echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \ + ( cd $(repo_name) && \ + git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \ + xz >../$(pkg_name)-$$version.$(suffix) ) ; \ + tar xJf $(pkg_name)-$$version.$(suffix) ; \ + ( cd $(pkg_name)-$$version ; ./autogen.sh ; rm -rf autom4te.cache .git* .packit.yaml *~ ) ; \ + tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \ + rm -rf $(pkg_name)-$$version ; \ + fi ; \ done -$(sha1s): %.$(suffix).sha1sum : %.$(suffix) +$(sha1s): %.tar.xz.sha1sum : %.tar.xz @for tarball in $< ; do \ - echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \ + echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \ sha1sum --binary $$tarball > $$tarball.sha1sum ; \ done +repository_clean: $(sha1s) + @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n" + @rm -rf $(git_repo) $(repo_name) + downloads_clean: - @rm -rf $(tarballs) $(signatures) $(sha1s) + @rm -rf $(tarballs) $(sha1s) + @rm -rf $(git_repo) $(repo_name)