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-10 17:00:55 +0300 committer: kx <kx@radix.pro> 2023-10-10 17:00:55 +0300 commit: d11958fa7d00a10c06959d34aec2f4f5ce577e12 parent: 4c4c9958e0a9450081e4d8cae03cc3019081a61a
Commit Summary:
openjdk-21.35
Diffstat:
2 files changed, 59 insertions, 0 deletions
diff --git a/packages/x/Makefile b/packages/x/Makefile
index a6d2c93..ee54527 100644
--- a/packages/x/Makefile
+++ b/packages/x/Makefile
@@ -53,6 +53,7 @@ SUBDIRS := Vulkan               \
            nitrogen             \
            obconf               \
            openbox              \
+           openjdk              \
            openjdk11u           \
            pcmanfm              \
            pidgin               \
diff --git a/packages/x/openjdk/Makefile b/packages/x/openjdk/Makefile
new file mode 100644
index 0000000..6cca609
--- /dev/null
+++ b/packages/x/openjdk/Makefile
@@ -0,0 +1,72 @@
+#
+# Project Home:
+# ============
+#   https://openjdk.org
+#
+# Compatibility:
+# =============
+#   https://www.azul.com/downloads/?package=jdk#zulu
+#
+# GitHub:
+# ======
+#   https://github.com/openjdk/jdk
+#
+# Clone:
+# =====
+#   git clone https://github.com/openjdk/jdk.git
+#
+
+url        = https://github.com/openjdk
+
+repo_name  = jdk
+pkg_name   = openjdk
+suffix     = tar.xz
+
+versions   = 21.35
+
+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=jdk-`echo $$version | rev | sed 's,^\([0-9]*\)\.,\1+,' | rev` ; \
+	  if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+	    echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot [tag: $${tag}] =======" ; \
+	    ( cd $(repo_name) && \
+	      git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \
+	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+	    tar xJf $(pkg_name)-$$version.$(suffix) ; \
+	    ( cd $(pkg_name)-$$version ; rm -rf .git* .jcheck ) ; \
+	    tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+	    rm -rf $(pkg_name)-$$version ; \
+	  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)