summaryrefslogtreecommitdiff
path: root/user/openjdk8/maintain
diff options
context:
space:
mode:
Diffstat (limited to 'user/openjdk8/maintain')
-rwxr-xr-xuser/openjdk8/maintain47
1 files changed, 47 insertions, 0 deletions
diff --git a/user/openjdk8/maintain b/user/openjdk8/maintain
new file mode 100755
index 000000000..bd0f69533
--- /dev/null
+++ b/user/openjdk8/maintain
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+##
+# This script downloads RC2 'openjdk8' .apk files,
+# extracts some JVM bits, and produces tarballs for
+# bootstrapping this package, suitable for upload to
+# https://distfiles.adelielinux.org/source/openjdk/.
+#
+# Note: checksums may vary between 'tar' versions or
+# implementations; please do not rely on this. The
+# output has been verified by 'diff -qr', may differ
+# in packing order, compression, or headers only.
+#
+# Based on https://git.adelielinux.org/-/snippets/172.
+#
+HERE="$(dirname $(readlink -f ${0}))";
+
+host=https://distfiles.adelielinux.org;
+repo=1.0-rc2;
+vers=8.252.09-r0;
+keep=usr/lib/jvm/java-1.8-openjdk;
+arch="aarch64 armv7 ppc64 ppc x86_64 pmmx";
+apks="
+openjdk8-jre-lib
+openjdk8-jre-base
+openjdk8-jre
+openjdk8
+";
+
+
+for cpu in $arch; do
+ printf "\n%s\n" "$cpu";
+ rm -fr "${HERE}"/$cpu; # sanity
+ mkdir -p "${HERE}"/$cpu/boot-home;
+ for apk in $apks; do
+ printf " * %s\n" "$apk-$vers.apk";
+ curl -s $host/adelie/$repo/user/$cpu/$apk-$vers.apk \
+ | tar -C "${HERE}"/$cpu -xzf - 2>/dev/null;
+ done
+ cp -a "${HERE}"/$cpu/$keep "${HERE}"/$cpu/boot-home/$cpu;
+ (
+ cd "${HERE}"/$cpu;
+ chown -R 1000:1000 boot-home;
+ tar -cJf "${HERE}"/openjdk8-bootstrap-$cpu.txz boot-home;
+ )
+ rm -fr "${HERE}"/$cpu;
+done \ No newline at end of file