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-05-17 21:35:26 +0300 committer: kx <kx@radix.pro> 2023-05-17 21:35:26 +0300 commit: 34d627157588b5fe6afbcb8a3d3b253bc85152bb parent: 225e80900f1580e96133bad83c395d6f73c09e09
Commit Summary:
dino-0.4.2
Diffstat:
2 files changed, 70 insertions, 0 deletions
diff --git a/packages/x/Makefile b/packages/x/Makefile
index 5097344..9fd3646 100644
--- a/packages/x/Makefile
+++ b/packages/x/Makefile
@@ -10,6 +10,7 @@ SUBDIRS := Vulkan               \
            dejavu-fonts         \
            dejavu-fonts-ttf     \
            desktop-file-utils   \
+           dino                 \
            feh                  \
            fontconfig           \
            fonts-tlwg           \
diff --git a/packages/x/dino/Makefile b/packages/x/dino/Makefile
new file mode 100644
index 0000000..b1915d2
--- /dev/null
+++ b/packages/x/dino/Makefile
@@ -0,0 +1,83 @@
+#
+# Project Home:
+# ============
+#   https://dino.im
+#
+# GitHub:
+# ======
+#   https://github.com/dino/dino
+#
+# Clone:
+# =====
+#   git clone https://github.com/dino/dino.git
+#
+
+url        = https://github.com/dino
+
+repo_name  = dino
+pkg_name   = dino
+suffix     = tar.xz
+
+versions   = 0.4.2
+
+# List of tags to be extracted:
+TAGS       = $(versions)
+
+git_repo   = .git_clone
+tarballs   = $(addsuffix .$(suffix), $(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=v`echo $$version` ; \
+	  if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+	    echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
+	    ( cd $(repo_name) ; \
+	      git submodule update --init ; \
+	      git archive --format=tar --prefix=$(repo_name)-$${version}/ --output=../$(repo_name)-$${version}.tar $${tag} ; \
+	      cmd="git submodule foreach --recursive 'git archive --format=tar --prefix=$(repo_name)-$${version}/\$$sm_path/ HEAD --output=\$$toplevel/../$(repo_name)-$${version}-sub-\$$sha1.tar'" ; \
+	      eval $${cmd} ; \
+	    ) ; \
+	    for tar in `ls $(repo_name)-$${version}-sub-*.tar` ; do \
+	      tar --concatenate --file $(repo_name)-$${version}.tar $${tar} ; \
+	    done ; \
+	    rm -f $(repo_name)-$${version}-sub-*.tar ; \
+	    xz $(repo_name)-$${version}.tar ; \
+	    tar xJf $(pkg_name)-$$version.$(suffix) ; \
+	    ( cd $(pkg_name)-$$version ; \
+	      find . -type f \( -name ".gitignore" -o -name ".gitmodules" -o -name ".dummy" \) -exec rm -f {} \; ; \
+	      for dir in `find . -type d -name ".github" -print` ; do \
+	        rm -rf $${dir} ; \
+	      done ; \
+	    ) ; \
+	    tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+	    rm -rf $(pkg_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)