Radix cross Linux 3pp sources

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

423 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-04-07 15:29:50 +0300 committer: kx <kx@radix.pro> 2023-04-07 15:29:50 +0300 commit: d8b69aa468bb1efa108e032ccde0b85fa63a5c64 parent: 63c35171c66d6e0f9add54c01bf81c127b0d9384
Commit Summary:
X packages
Diffstat:
1 file changed, 63 insertions, 0 deletions
diff --git a/packages/x/xdg-utils/Makefile b/packages/x/xdg-utils/Makefile
new file mode 100644
index 0000000..65aa19d
--- /dev/null
+++ b/packages/x/xdg-utils/Makefile
@@ -0,0 +1,77 @@
+#
+# Project Home:
+# ============
+# https://cgit.freedesktop.org/xdg/xdg-utils
+#
+# cGit:
+# ====
+# https://cgit.freedesktop.org/xdg/xdg-utils
+#
+# Clone:
+# =====
+# git clone git://anongit.freedesktop.org/xdg/xdg-utils
+# git clone https://anongit.freedesktop.org/git/xdg/xdg-utils.git
+#
+
+url        = git://anongit.freedesktop.org/git/xdg/xdg-utils
+
+repo_name  = xdg-utils
+
+#
+# List of tags to be extracted:
+#
+TAGS       = 8c65fb00f55ec676b24872885dc2dbf7a4dacf25:1.0.2
+TAGS      += 9595033d358a7d78e2b882c36ac11f29697f064d:1.1.0-rc2
+TAGS      += f0df41402e827051ec16bac212c8eaf08ada75e4:1.1.0
+TAGS      += ef8a58be4049697bb6347c3c5b8fff4d2b2deb86:1.1.1
+TAGS      += 159fc37075db2decf446f453fe1a796da6921aad:1.1.3
+
+suffix     = tar.xz
+
+git_repo   = .git_clone
+versions   = $(foreach tag, $(TAGS), $(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)
+	@if [ "$(url)" = 'git://radix.pro' ]; then \
+	   git clone $(url)/$(repo_name).git $(repo_name) ; \
+	 else \
+	   git clone $(url) $(repo_name) ; \
+	 fi
+	@touch $@
+
+$(tarballs): $(git_repo)
+	@for tag in $(TAGS) ; do \
+	  version=`echo $$tag | cut -f 2 -d ':'` ; \
+	  hash=`echo $$tag | cut -f 1 -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) ) ; \
+	  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)