Sources

The Tree of Radix and Third Party Sources

1388 Commits   0 Branches   11 Tags
author: kx <kx@radix.pro> 2021-12-27 04:55:30 +0300 committer: kx <kx@radix.pro> 2021-12-27 04:55:30 +0300 commit: 6349c683bce5a450eebc370b60e2b11b67bca34a parent: a8658a8de52a23166af1335719f680f78b4bbb36
Commit Summary:
jemalloc-5.2.1
Diffstat:
1 file changed, 32 insertions, 14 deletions
diff --git a/packages/l/jemalloc/Makefile b/packages/l/jemalloc/Makefile
index 27bdf65..583474e 100644
--- a/packages/l/jemalloc/Makefile
+++ b/packages/l/jemalloc/Makefile
@@ -1,38 +1,60 @@
 #
 # Project Home:
 # ============
-# http://www.canonware.com/jemalloc
+# https://github.com/jemalloc/jemalloc
 #
 # Downloads:
 # =========
-# http://www.canonware.com/download/jemalloc
+# https://github.com/jemalloc/jemalloc.git
 #
 
-url         = http://www.canonware.com/download/jemalloc
+url         = https://github.com/jemalloc/jemalloc.git
 
-versions    = 3.6.0 4.0.4 4.2.1
-pkgname     = jemalloc
-suffix      = tar.bz2
+repo_name   = jemalloc
 
-tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+versions    = 5.2.1
+suffix      = tar.xz
+
+TAGS        = $(versions)
+
+git_repo    = .git_clone
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(repo_name)-, $(versions)))
 sha1s       = $(addsuffix .sha1sum, $(tarballs))
 
+TARGETS = repository_clean
+
+all: $(TARGETS)
 
-all: $(tarballs) $(signatures) $(sha1s)
+.PHONY: downloads_clean repository_clean
 
-.PHONY: downloads_clean
+$(git_repo):
+	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
+	@rm -rf $(repo_name)
+	@git clone $(url) $(repo_name)
+	@touch $@
 
-$(tarballs):
-	@echo -e "\n======= Downloading source tarballs =======\n"
-	@for tarball in $(tarballs) ; do \
-	  wget -N $(url)/$$tarball ; \
+
+$(tarballs): $(git_repo)
+	@for version in $(TAGS) ; do \
+	  tag=`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=$(repo_name)-$$version/ $$tag | \
+	      xz >../$(repo_name)-$$version.$(suffix) ) ; \
+	  fi ; \
 	done
 
 $(sha1s): %.$(suffix).sha1sum : %.$(suffix)
 	@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) $(sha1s)
+	@rm -rf $(git_repo) $(repo_name)