Radix cross Linux 3pp sources

RcL sources – is a tree of Third Party and Radix source tarballs

343 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-10-12 18:09:58 +0300 committer: kx <kx@radix.pro> 2023-10-12 18:09:58 +0300 commit: 65a121392a6322435b467c347127030ce283d3e1 parent: 50c97b5df3bfd4c671998ea6cc496b38648481a3
Commit Summary:
php-imagick: get package instead of sources
Diffstat:
2 files changed, 71 insertions, 31 deletions
diff --git a/packages/x/php-imagick/Makefile b/packages/x/php-imagick/Makefile
index a16e0ed..a806891 100644
--- a/packages/x/php-imagick/Makefile
+++ b/packages/x/php-imagick/Makefile
@@ -11,53 +11,41 @@
 # =====
 #   git clone https://github.com/Imagick/imagick.git
 #
+# Download:
+# ========
+#   https://pecl.php.net/get/imagick-3.7.0.tgz
+#
 
-url        = https://github.com/Imagick
-
-repo_name  = imagick
-pkg_name   = php-imagick
-suffix     = tar.xz
-
-versions   = 3.7.0
+url         = https://pecl.php.net/get
 
-git_repo   = .git_clone
-tarballs   = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
-sha1s      = $(addsuffix .sha1sum, $(tarballs))
+versions    = 3.7.0
 
-TARGETS = repository_clean
+pkgname     = php-imagick
+suffix      = tar.xz
 
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
 
-all: $(TARGETS)
 
-.PHONY: downloads_clean repository_clean
+all: $(tarballs) $(signatures) $(sha1s)
 
-$(git_repo):
-	@echo -e "\n======= Clone $(repo_name).git repository =======\n"
-	@rm -rf $(repo_name)
-	@git clone $(url)/$(repo_name).git $(repo_name)
-	@touch $@
+.PHONY: downloads_clean
 
-$(tarballs): $(git_repo)
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
 	@for version in $(versions) ; 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=$(pkg_name)-$$version/ $$tag | \
-	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
-	  fi ; \
+	  wget -N $(url)/imagick-$${version}.tgz ; \
+	  tar xf imagick-$${version}.tgz ; \
+	  mv imagick-$${version} $(pkgname)-$${version} ; \
+	  tar cJf $(pkgname)-$${version}.tar.xz $(pkgname)-$${version} package.xml ; \
+	  rm -rf $(pkgname)-$${version} imagick-$${version}.tgz package.xml ; \
 	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)
diff --git a/packages/x/php-imagick/Makefile.github b/packages/x/php-imagick/Makefile.github
new file mode 100644
index 0000000..a16e0ed
--- /dev/null
+++ b/packages/x/php-imagick/Makefile.github
@@ -0,0 +1,63 @@
+#
+# Project Home:
+# ============
+#   https://github.com/imagick/imagick
+#
+# GitHub:
+# ======
+#   https://github.com/Imagick/imagick
+#
+# Clone:
+# =====
+#   git clone https://github.com/Imagick/imagick.git
+#
+
+url        = https://github.com/Imagick
+
+repo_name  = imagick
+pkg_name   = php-imagick
+suffix     = tar.xz
+
+versions   = 3.7.0
+
+git_repo   = .git_clone
+tarballs   = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
+sha1s      = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_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)
+	@for version in $(versions) ; 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=$(pkg_name)-$$version/ $$tag | \
+	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+	@for tarball in $< ; do \
+	  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)