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-04-08 21:49:09 +0300 committer: kx <kx@radix.pro> 2023-04-08 21:49:09 +0300 commit: 8da99f0df767bd0f30cec5080adccec66eecaab4 parent: bc12d811bfdbcc8ba92fd32a06eabf0644eac6b9
Commit Summary:
media tarballs
Diffstat:
1 file changed, 61 insertions, 0 deletions
diff --git a/packages/m/mp4v2/Makefile b/packages/m/mp4v2/Makefile
new file mode 100644
index 0000000..63a35ad
--- /dev/null
+++ b/packages/m/mp4v2/Makefile
@@ -0,0 +1,76 @@
+#
+# Project Home:
+# ============
+#   https://mp4v2.org
+#
+# GitHub:
+# ======
+#   https://github.com/enzo1982/mp4v2
+#
+# Clone:
+# =====
+#   git clone https://github.com/enzo1982/mp4v2.git
+#
+
+url        = https://github.com/enzo1982
+
+repo_name  = mp4v2
+
+#
+# List of revisions to be extracted:
+# =================================
+#
+#                                               hash | version
+#            ----------------------------------------+--------
+revisions  = f95da887c8579623c3c6df0445ec6efea93f1433:2.1.1
+
+git_repo   = .git_clone
+
+suffix     = tar.xz
+
+versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs   = $(addsuffix .$(suffix), $(addprefix $(repo_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 revision in $(revisions) ; do \
+	  hash=`echo $$revision | cut -f 1 -d ':'` ; \
+	  version=`echo $$revision | cut -f 2 -d ':'` ; \
+	  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/ $$hash | \
+	      xz >../$(repo_name)-$$version.$(suffix) ) ; \
+	    tar xJf $(repo_name)-$$version.$(suffix) ; \
+	    ( cd $(repo_name)-$$version ; autoreconf -v -f --install ; rm -rf autom4te.cache .git* ) ; \
+	    tar cJf $(repo_name)-$$version.$(suffix) $(repo_name)-$$version ; \
+	    rm -rf $(repo_name)-$$version ; \
+	  fi ; \
+	done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+	@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)