author: kx <kx@radix.pro> 2023-12-26 15:07:53 +0300
committer: kx <kx@radix.pro> 2023-12-26 15:07:53 +0300
commit: 1f1ca069c039c9ef808bb9cfa8fed5b184aa4bb3
parent: 2ad747fca479e740c7a42ffe22aa1f07d14adb68
Commit Summary:
Diffstat:
1 file changed, 14 insertions, 38 deletions
diff --git a/packages/n/avahi/Makefile b/packages/n/avahi/Makefile
index ed3d2c0..592da7a 100644
--- a/packages/n/avahi/Makefile
+++ b/packages/n/avahi/Makefile
@@ -10,62 +10,35 @@
#
# GitHub:
# ======
-# git clone https://github.com/avahi/avahi.git
+# https://github.com/avahi/avahi
#
-url = https://github.com/avahi
+url = https://avahi.org/download
-repo_name = avahi
-pkg_name = avahi
-suffix = tar.xz
+versions = 0.6.31 0.6.32 0.7 0.8
-versions = 0.8
+pkgname = avahi
+suffix = tar.gz
-# List of tags to be extracted:
-TAGS = $(addprefix v, $(versions))
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
-git_repo = .git_clone
-tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
-sha1s = $(addsuffix .sha1sum, $(tarballs))
-TARGETS = repository_clean
+all: $(tarballs) $(sha1s)
+.PHONY: downloads_clean
-all: $(TARGETS)
-
-.PHONY: downloads_clean repository_clean
-
-$(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)
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======\n"
@for version in $(versions) ; do \
- tag=v`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 ; NOCONFIGURE=1 ./autogen.sh ; rm -rf autom4te.cache .git* .dir-locals.el .travis.yml *~ ) ; \
- tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
- rm -rf $(pkg_name)-$$version ; \
- fi ; \
+ wget -N $(url)/$(pkgname)-$$version.$(suffix) ; \
done
-$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
@for tarball in $< ; do \
- echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
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) $(sha1s)
- @rm -rf $(git_repo) $(repo_name)