summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLéo2020-04-15 02:58:14 +0200
committerLéo2020-04-15 02:58:14 +0200
commitf892d6739a2858e903115a06e09477e041c77be2 (patch)
treea6af36e3047e3be76c1c351c1ba9ae0ffa205bbe
downloadaur-f892d6739a2858e903115a06e09477e041c77be2.tar.gz
First publishing
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD177
-rw-r--r--install_jdk8-adoptopenjdk.sh50
-rw-r--r--install_jre8-adoptopenjdk-headless.sh48
-rw-r--r--install_jre8-adoptopenjdk.sh42
5 files changed, 365 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..af2a7fabd2f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = java8-adoptopenjdk
+ pkgdesc = AdoptOpenJDK 8 HotSpot
+ pkgver = 8.u242
+ pkgrel = 1
+ url = https://adoptopenjdk.net/
+ arch = x86_64
+ license = custom
+ makedepends = ca-certificates-utils
+ makedepends = hicolor-icon-theme
+ makedepends = java-environment-common
+ makedepends = java-runtime-common
+ makedepends = nss
+ makedepends = xdg-utils
+ source = https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz
+ sha256sums = f39b523c724d0e0047d238eb2bb17a9565a60574cf651206c867ee5fc000ab43
+
+pkgname = jre8-adoptopenjdk-headless
+ pkgdesc = AdoptOpenJDK Java 8 headless runtime environment
+ install = install_jre8-adoptopenjdk-headless.sh
+ depends = java-runtime-common
+ depends = ca-certificates-utils
+ depends = nss
+ optdepends = java-rhino: for some JavaScript support
+ provides = java-runtime-headless=8
+ provides = java-runtime-headless-openjdk=8
+ backup =
+
+pkgname = jre8-adoptopenjdk
+ pkgdesc = AdoptOpenJDK Java 8 full runtime environment
+ install = install_jre8-adoptopenjdk.sh
+ depends = jre8-adoptopenjdk-headless=8.u242-1
+ depends = xdg-utils
+ depends = hicolor-icon-theme
+ optdepends = icedtea-web: web browser plugin + Java Web Start
+ optdepends = alsa-lib: for basic sound support
+ optdepends = gtk2: for the Gtk+ look and feel - desktop usage
+ optdepends = java8-openjfx: for JavaFX GUI components support
+ provides = java-runtime=8
+ provides = java-runtime-openjdk=8
+
+pkgname = jdk8-adoptopenjdk
+ pkgdesc = AdoptOpenJDK Java 8 development kit
+ install = install_jdk8-adoptopenjdk.sh
+ depends = java-environment-common
+ depends = jre8-adoptopenjdk=8.u242-1
+ provides = java-environment=8
+ provides = java-environment-openjdk=8
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9b1c86b6b78
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,177 @@
+# Maintainer: Leeo97one <contact.leeo97one@gmail.com>
+# Based on jdk8-openjdk 8.u242-1
+
+pkgname=('jre8-adoptopenjdk-headless' 'jre8-adoptopenjdk' 'jdk8-adoptopenjdk')
+pkgbase=java8-adoptopenjdk
+_java_ver=8
+_jdk_update=242
+_jdk_build=08
+pkgver=${_java_ver}.u${_jdk_update}
+_repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
+_targz_ver=${_java_ver}u${_jdk_update}b${_jdk_build}
+pkgrel=1
+pkgdesc="AdoptOpenJDK 8 HotSpot"
+arch=('x86_64')
+url='https://adoptopenjdk.net/'
+license=('custom')
+makedepends=('ca-certificates-utils' 'hicolor-icon-theme'
+ 'java-environment-common' 'java-runtime-common' 'nss' 'xdg-utils')
+source=(https://github.com/AdoptOpenJDK/openjdk${_java_ver}-binaries/releases/download/${_repo_ver}/OpenJDK${_java_ver}U-jdk_x64_linux_hotspot_${_targz_ver}.tar.gz)
+
+sha256sums=('f39b523c724d0e0047d238eb2bb17a9565a60574cf651206c867ee5fc000ab43')
+
+_JARCH=amd64
+_jdkname=adoptopenjdk${_java_ver}
+_jvmdir=/usr/lib/jvm/java-8-adoptopenjdk
+_imgdir="${_repo_ver}"
+_nonheadless=(bin/policytool
+ lib/${_JARCH}/libjsound.so
+ lib/${_JARCH}/libjsoundalsa.so
+ lib/${_JARCH}/libsplashscreen.so)
+
+package_jre8-adoptopenjdk-headless() {
+ pkgdesc='AdoptOpenJDK Java 8 headless runtime environment'
+ depends=('java-runtime-common' 'ca-certificates-utils' 'nss')
+ optdepends=('java-rhino: for some JavaScript support')
+ provides=('java-runtime-headless=8' 'java-runtime-headless-openjdk=8')
+ # Upstream config files that should go to etc and get backup
+ _backup_etc=(etc/java-8-adoptopenjdk/${_JARCH}/jvm.cfg
+ etc/java-8-adoptopenjdk/calendars.properties
+ etc/java-8-adoptopenjdk/content-types.properties
+ etc/java-8-adoptopenjdk/flavormap.properties
+ etc/java-8-adoptopenjdk/images/cursors/cursors.properties
+ etc/java-8-adoptopenjdk/logging.properties
+ etc/java-8-adoptopenjdk/management/jmxremote.access
+ etc/java-8-adoptopenjdk/management/jmxremote.password
+ etc/java-8-adoptopenjdk/management/management.properties
+ etc/java-8-adoptopenjdk/management/snmp.acl
+ etc/java-8-adoptopenjdk/net.properties
+ etc/java-8-adoptopenjdk/psfont.properties.ja
+ etc/java-8-adoptopenjdk/psfontj2d.properties
+ etc/java-8-adoptopenjdk/security/java.policy
+ etc/java-8-adoptopenjdk/security/java.security
+ etc/java-8-adoptopenjdk/sound.properties)
+ backup=(${_backup_etc[@]})
+ install=install_jre8-adoptopenjdk-headless.sh
+
+ cd ${_imgdir}/jre
+
+ install -d -m 755 "${pkgdir}${_jvmdir}/jre/"
+ cp -a bin lib "${pkgdir}${_jvmdir}/jre"
+
+ # Set config files
+ mv "${pkgdir}${_jvmdir}"/jre/lib/management/jmxremote.password{.template,}
+ mv "${pkgdir}${_jvmdir}"/jre/lib/management/snmp.acl{.template,}
+
+ # Remove 'non-headless' lib files
+ for f in "${_nonheadless[@]}"; do
+ rm "${pkgdir}${_jvmdir}/jre/${f}"
+ done
+
+ # Man pages
+ pushd "${pkgdir}${_jvmdir}/jre/bin"
+ install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
+ for file in *; do
+ if [ -f "${srcdir}/${_imgdir}/man/man1/${file}.1" ]; then
+ install -m 644 "${srcdir}/${_imgdir}/man/man1/${file}.1" \
+ "${pkgdir}/usr/share/man/man1/${file}-${_jdkname}.1"
+ fi
+ if [ -f "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" ]; then
+ install -m 644 "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" \
+ "${pkgdir}/usr/share/man/ja/man1/${file}-${_jdkname}.1"
+ fi
+ done
+ popd
+
+ # Link JKS keystore from ca-certificates-utils
+ rm -f "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
+ ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
+
+ # Install license
+ install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgbase}/"
+ install -m 644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
+ "${pkgdir}/usr/share/licenses/${pkgbase}"
+ ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # Move config files that were set in _backup_etc from ./lib to /etc
+ for file in "${_backup_etc[@]}"; do
+ _filepkgpath=${_jvmdir}/jre/lib/${file#etc/java-8-adoptopenjdk/}
+ install -D -m 644 "${pkgdir}${_filepkgpath}" "${pkgdir}/${file}"
+ ln -sf /${file} "${pkgdir}${_filepkgpath}"
+ done
+}
+
+package_jre8-adoptopenjdk() {
+ pkgdesc='AdoptOpenJDK Java 8 full runtime environment'
+ depends=("jre8-adoptopenjdk-headless=${pkgver}-${pkgrel}" 'xdg-utils' 'hicolor-icon-theme')
+ optdepends=('icedtea-web: web browser plugin + Java Web Start'
+ 'alsa-lib: for basic sound support'
+ 'gtk2: for the Gtk+ look and feel - desktop usage'
+ 'java8-openjfx: for JavaFX GUI components support')
+ provides=('java-runtime=8' 'java-runtime-openjdk=8')
+ install=install_jre8-adoptopenjdk.sh
+
+ cd ${_imgdir}/jre
+
+ for f in "${_nonheadless[@]}"; do
+ install -D ${f} "${pkgdir}${_jvmdir}/jre/${f}"
+ done
+
+ # Man pages
+ pushd "${pkgdir}${_jvmdir}/jre/bin"
+ install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
+ for file in *; do
+ install -m 644 "${srcdir}/${_imgdir}/man/man1/${file}.1" \
+ "${pkgdir}/usr/share/man/man1/${file}-${_jdkname}.1"
+ install -m 644 "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" \
+ "${pkgdir}/usr/share/man/ja/man1/${file}-${_jdkname}.1"
+ done
+ popd
+
+ # Install license
+ install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgbase}/"
+ ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+package_jdk8-adoptopenjdk() {
+ pkgdesc='AdoptOpenJDK Java 8 development kit'
+ depends=('java-environment-common' "jre8-adoptopenjdk=${pkgver}-${pkgrel}")
+ provides=('java-environment=8' 'java-environment-openjdk=8')
+ install=install_jdk8-adoptopenjdk.sh
+
+ cd ${_imgdir}
+
+ # Main files
+ install -d -m 755 "${pkgdir}${_jvmdir}"
+
+ cp -a include lib "${pkgdir}${_jvmdir}"
+
+ # 'bin' files
+ pushd bin
+
+ # 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
+ for b in $(ls | grep -v java-rmi.cgi); do
+ if [ -e ../jre/bin/${b} ]; then
+ # Provide a link of the jre binary in the jdk/bin/ directory
+ ln -s ../jre/bin/${b} "${pkgdir}${_jvmdir}/bin/${b}"
+ else
+ # Copy binary to jdk/bin/
+ install -D -m 755 ${b} "${pkgdir}${_jvmdir}/bin/${b}"
+ # Copy man page
+ if [ -f ../man/man1/${b}.1 ]; then
+ install -D -m 644 ../man/man1/${b}.1 "${pkgdir}/usr/share/man/man1/${b}-${_jdkname}.1"
+ fi
+ if [ -f ../man/ja/man1/${b}.1 ]; then
+ install -D -m 644 ../man/ja/man1/${b}.1 "${pkgdir}/usr/share/man/ja/man1/${b}-${_jdkname}.1"
+ fi
+ fi
+ done
+ popd
+
+ # Handling 'java-rmi.cgi' separately
+ install -D -m 755 bin/java-rmi.cgi "${pkgdir}${_jvmdir}/bin/java-rmi.cgi"
+
+ # link license
+ install -d -m 755 "${pkgdir}/usr/share/licenses/"
+ ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
+}
diff --git a/install_jdk8-adoptopenjdk.sh b/install_jdk8-adoptopenjdk.sh
new file mode 100644
index 00000000000..5d44fa2f82c
--- /dev/null
+++ b/install_jdk8-adoptopenjdk.sh
@@ -0,0 +1,50 @@
+THIS_JDK='java-8-adoptopenjdk'
+
+fix_default() {
+ if [ ! -x /usr/bin/java ]; then
+ /usr/bin/archlinux-java unset
+ echo ""
+ else
+ /usr/bin/archlinux-java get
+ fi
+}
+
+post_install() {
+ default=$(fix_default)
+ case ${default} in
+ "" | ${THIS_JDK}/jre)
+ /usr/bin/archlinux-java set ${THIS_JDK}
+ ;;
+ ${THIS_JDK})
+ # Nothing
+ ;;
+ *)
+ echo "Default Java environment is already set to '${default}'"
+ echo "See 'archlinux-java help' to change it"
+ ;;
+ esac
+
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/bin/update-ca-trust
+ fi
+}
+
+post_upgrade() {
+ default=$(fix_default)
+ if [ -z "${default}" -o "x${default}" = "x${THIS_JDK}/jre" ]; then
+ /usr/bin/archlinux-java set ${THIS_JDK}
+ fi
+
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/bin/update-ca-trust
+ fi
+}
+
+pre_remove() {
+ if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then
+ /usr/bin/archlinux-java unset
+ if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then
+ /usr/bin/archlinux-java set ${THIS_JDK}/jre
+ fi
+ fi
+}
diff --git a/install_jre8-adoptopenjdk-headless.sh b/install_jre8-adoptopenjdk-headless.sh
new file mode 100644
index 00000000000..1ac798221ae
--- /dev/null
+++ b/install_jre8-adoptopenjdk-headless.sh
@@ -0,0 +1,48 @@
+THIS_JRE='java-8-adoptopenjdk/jre'
+
+fix_default() {
+ if [ ! -x /usr/bin/java ]; then
+ /usr/bin/archlinux-java unset
+ echo ""
+ else
+ /usr/bin/archlinux-java get
+ fi
+}
+
+post_install() {
+ default=$(fix_default)
+ case ${default} in
+ "")
+ /usr/bin/archlinux-java set ${THIS_JRE}
+ ;;
+ ${THIS_JRE} | ${THIS_JRE/\/jre})
+ # Nothing
+ ;;
+ *)
+ echo "Default Java environment is already set to '${default}'"
+ echo "See 'archlinux-java help' to change it"
+ ;;
+ esac
+
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/bin/update-ca-trust
+ fi
+}
+
+post_upgrade() {
+ if [ -z $(fix_default) ]; then
+ /usr/bin/archlinux-java set ${THIS_JRE}
+ fi
+
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/bin/update-ca-trust
+ fi
+}
+
+pre_remove() {
+ default=$(fix_default)
+ if [ "x${default/\/jre}" = "x${THIS_JRE/\/jre}" ]; then
+ /usr/bin/archlinux-java unset
+ echo "No Java environment is set as default anymore"
+ fi
+}
diff --git a/install_jre8-adoptopenjdk.sh b/install_jre8-adoptopenjdk.sh
new file mode 100644
index 00000000000..1baa4addaac
--- /dev/null
+++ b/install_jre8-adoptopenjdk.sh
@@ -0,0 +1,42 @@
+THIS_JRE='java-8-adoptopenjdk/jre'
+
+fix_default() {
+ if [ ! -x /usr/bin/java ]; then
+ /usr/bin/archlinux-java unset
+ echo ""
+ else
+ /usr/bin/archlinux-java get
+ fi
+}
+
+post_install() {
+ default=$(fix_default)
+ case ${default} in
+ "")
+ /usr/bin/archlinux-java set ${THIS_JRE}
+ ;;
+ ${THIS_JRE} | ${THIS_JRE/\/jre})
+ # Nothing
+ ;;
+ *)
+ echo "Default Java environment is already set to '${default}'"
+ echo "See 'archlinux-java help' to change it"
+ ;;
+ esac
+
+ echo "when you use a non-reparenting window manager,"
+ echo "set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh"
+}
+
+post_upgrade() {
+ if [ -z "$(fix_default)" ]; then
+ /usr/bin/archlinux-java set ${THIS_JRE}
+ fi
+}
+
+pre_remove() {
+ if [ "x$(fix_default)" = "x${THIS_JRE/\/jre}" ]; then
+ /usr/bin/archlinux-java unset
+ echo "No Java environment is set as default anymore"
+ fi
+}