summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2019-02-27 22:33:53 +0100
committerMichael Lass2019-02-27 22:33:53 +0100
commit03663c966ce6d6a56e7d0c951bbc8a20b57fbc9f (patch)
treefe8e1b3618c32412dfb74790a4938c51ed8dae02
downloadaur-03663c966ce6d6a56e7d0c951bbc8a20b57fbc9f.tar.gz
Initial commit
-rw-r--r--.SRCINFO57
-rw-r--r--PKGBUILD106
-rw-r--r--freedesktop-java.desktop9
-rw-r--r--freedesktop-jconsole.desktop8
-rw-r--r--freedesktop-jshell.desktop8
-rw-r--r--freedesktop-policytool.desktop8
-rw-r--r--install_jdk-adoptopenjdk.sh50
7 files changed, 246 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..961a69db122a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,57 @@
+pkgbase = jdk-adoptopenjdk
+ pkgdesc = OpenJDK Java 11 development kit (AdoptOpenJDK build)
+ pkgver = 11.0.2.u9
+ pkgrel = 1
+ url = https://adoptopenjdk.net/
+ install = install_jdk-adoptopenjdk.sh
+ arch = x86_64
+ license = custom
+ depends = java-runtime-common>=3
+ depends = ca-certificates-utils
+ depends = desktop-file-utils
+ depends = libxrender
+ depends = libxtst
+ depends = alsa-lib
+ optdepends = gtk2: for the Gtk+ 2 look and feel
+ optdepends = gtk3: for the Gtk+ 3 look and feel
+ provides = java-runtime-headless=11
+ provides = java-runtime-headless-openjdk=11
+ provides = jre11-openjdk-headless=11.0.2.u9
+ provides = jre-openjdk-headless=11.0.2.u9
+ provides = java-runtime=11
+ provides = java-runtime-openjdk=11
+ provides = jre11-openjdk=11.0.2.u9
+ provides = jre-openjdk=11.0.2.u9
+ provides = java-environment=11
+ provides = java-environment-openjdk=11
+ provides = jdk11-openjdk=11.0.2.u9
+ provides = jdk-openjdk=11.0.2.u9
+ provides = openjdk11-src=11.0.2.u9
+ provides = openjdk-src=11.0.2.u9
+ backup = etc/jdk-adoptopenjdk/net.properties
+ backup = etc/jdk-adoptopenjdk/logging.properties
+ backup = etc/jdk-adoptopenjdk/security/java.security
+ backup = etc/jdk-adoptopenjdk/security/policy/limited/exempt_local.policy
+ backup = etc/jdk-adoptopenjdk/security/policy/limited/default_US_export.policy
+ backup = etc/jdk-adoptopenjdk/security/policy/limited/default_local.policy
+ backup = etc/jdk-adoptopenjdk/security/policy/unlimited/default_US_export.policy
+ backup = etc/jdk-adoptopenjdk/security/policy/unlimited/default_local.policy
+ backup = etc/jdk-adoptopenjdk/security/policy/README.txt
+ backup = etc/jdk-adoptopenjdk/security/java.policy
+ backup = etc/jdk-adoptopenjdk/management/management.properties
+ backup = etc/jdk-adoptopenjdk/management/jmxremote.access
+ backup = etc/jdk-adoptopenjdk/management/jmxremote.password.template
+ backup = etc/jdk-adoptopenjdk/sound.properties
+ source = https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.2%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.2_9.tar.gz
+ source = freedesktop-java.desktop
+ source = freedesktop-jconsole.desktop
+ source = freedesktop-policytool.desktop
+ source = freedesktop-jshell.desktop
+ sha256sums = d02089d834f7702ac1a9776d8d0d13ee174d0656cf036c6b68b9ffb71a6f610e
+ sha256sums = 734aab5e8fca5360fd996142a0c0ff23434da56f83c21b26cfbcbf31556230eb
+ sha256sums = 53b7da18785675438d1d7cfa776be419a313c11049c48f791c7426224fe51025
+ sha256sums = a0cca82e4ebe103d90399911164c17bee61022c67633f55b83d2fc9de15ccd68
+ sha256sums = bc4305c5870fa8e050c0a2cbc629a8f84e366200b436429c789038596a4259f6
+
+pkgname = jdk-adoptopenjdk
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1d53c162f639
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,106 @@
+# Maintainer: Michael Lass <bevan@bi-co.net>
+
+# This PKGBUILD heavily borrows from java-openjdk in [extra] maintained by:
+# Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Guillaume ALAUX <guillaume@archlinux.org>
+
+# This PKGBUILD is maintained on github:
+# https://github.com/michaellass/AUR
+
+_majorver=11
+_minorver=0
+_securityver=2
+_updatever=9
+pkgrel=1
+pkgver=${_majorver}.${_minorver}.${_securityver}.u${_updatever}
+_tag_ver=${_majorver}.${_minorver}.${_securityver}+${_updatever}
+
+pkgname=jdk-adoptopenjdk
+pkgdesc="OpenJDK Java ${_majorver} development kit (AdoptOpenJDK build)"
+arch=('x86_64')
+url='https://adoptopenjdk.net/'
+license=('custom')
+
+depends=('java-runtime-common>=3' 'ca-certificates-utils' 'desktop-file-utils' 'libxrender' 'libxtst' 'alsa-lib')
+optdepends=('gtk2: for the Gtk+ 2 look and feel'
+ 'gtk3: for the Gtk+ 3 look and feel')
+provides=("java-runtime-headless=${_majorver}"
+ "java-runtime-headless-openjdk=${_majorver}"
+ "jre${_majorver}-openjdk-headless=${pkgver}"
+ "jre-openjdk-headless=${pkgver}"
+ "java-runtime=${_majorver}"
+ "java-runtime-openjdk=${_majorver}"
+ "jre${_majorver}-openjdk=${pkgver}"
+ "jre-openjdk=${pkgver}"
+ "java-environment=${_majorver}"
+ "java-environment-openjdk=${_majorver}"
+ "jdk${_majorver}-openjdk=${pkgver}"
+ "jdk-openjdk=${pkgver}"
+ "openjdk${_majorver}-src=${pkgver}"
+ "openjdk-src=${pkgver}")
+backup=(etc/${pkgname}/net.properties
+ etc/${pkgname}/logging.properties
+ etc/${pkgname}/security/java.security
+ etc/${pkgname}/security/policy/limited/exempt_local.policy
+ etc/${pkgname}/security/policy/limited/default_US_export.policy
+ etc/${pkgname}/security/policy/limited/default_local.policy
+ etc/${pkgname}/security/policy/unlimited/default_US_export.policy
+ etc/${pkgname}/security/policy/unlimited/default_local.policy
+ etc/${pkgname}/security/policy/README.txt
+ etc/${pkgname}/security/java.policy
+ etc/${pkgname}/management/management.properties
+ etc/${pkgname}/management/jmxremote.access
+ etc/${pkgname}/management/jmxremote.password.template
+ etc/${pkgname}/sound.properties)
+install=install_jdk-adoptopenjdk.sh
+
+source=(https://github.com/AdoptOpenJDK/openjdk${_majorver}-binaries/releases/download/jdk-${_tag_ver/+/%2B}/OpenJDK${_majorver}U-jdk_x64_linux_hotspot_${_tag_ver/+/_}.tar.gz
+ freedesktop-java.desktop
+ freedesktop-jconsole.desktop
+ freedesktop-policytool.desktop
+ freedesktop-jshell.desktop)
+sha256sums=('d02089d834f7702ac1a9776d8d0d13ee174d0656cf036c6b68b9ffb71a6f610e'
+ '734aab5e8fca5360fd996142a0c0ff23434da56f83c21b26cfbcbf31556230eb'
+ '53b7da18785675438d1d7cfa776be419a313c11049c48f791c7426224fe51025'
+ 'a0cca82e4ebe103d90399911164c17bee61022c67633f55b83d2fc9de15ccd68'
+ 'bc4305c5870fa8e050c0a2cbc629a8f84e366200b436429c789038596a4259f6')
+
+_jvmdir=/usr/lib/jvm/java-${_majorver}-adoptopenjdk
+_jdkdir=jdk-${_tag_ver}
+
+package() {
+
+ install -dm 755 "${pkgdir}${_jvmdir}"
+ cp -a "${srcdir}/${_jdkdir}"/* "${pkgdir}${_jvmdir}"
+
+ cd "${pkgdir}${_jvmdir}"
+
+ # Conf
+ install -dm 755 "${pkgdir}/etc"
+ mv conf "${pkgdir}/etc/${pkgname}"
+ ln -sf /etc/${pkgname} conf
+
+ # Legal
+ install -dm 755 "${pkgdir}/usr/share/licenses"
+ mv legal "${pkgdir}/usr/share/licenses/${pkgname}"
+ ln -sf /usr/share/licenses/${pkgname} legal
+
+ # Man pages
+ for f in man/man1/* man/ja/man1/* man/ja_JP.UTF-8/man1/*; do
+ install -Dm 644 "${f}" "${pkgdir}/usr/share/${f/\.1/-adoptopenjdk${_majorver}.1}"
+ done
+ rm -rf man
+ ln -sf /usr/share/man man
+
+ # Link JKS keystore from ca-certificates-utils
+ rm -f lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts lib/security/cacerts
+
+ # Desktop files
+ for f in jconsole policytool java jshell; do
+ install -Dm 644 \
+ "${srcdir}/freedesktop-${f}.desktop" \
+ "${pkgdir}/usr/share/applications/${f}-${pkgname}.desktop"
+ done
+
+}
diff --git a/freedesktop-java.desktop b/freedesktop-java.desktop
new file mode 100644
index 000000000000..337bb9658c4e
--- /dev/null
+++ b/freedesktop-java.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=AdoptOpenJDK Java 11 Runtime
+Comment=AdoptOpenJDK Java 11 Runtime
+Keywords=java;runtime
+Exec=/usr/lib/jvm/java-11-adoptopenjdk/bin/java -jar
+Terminal=false
+Type=Application
+MimeType=application/x-java-archive;application/java-archive;application/x-jar;
+NoDisplay=true
diff --git a/freedesktop-jconsole.desktop b/freedesktop-jconsole.desktop
new file mode 100644
index 000000000000..a42acf6fb6f7
--- /dev/null
+++ b/freedesktop-jconsole.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=AdoptOpenJDK Java 11 Console
+Comment=AdoptOpenJDK Java 11 Monitoring & Management Console
+Keywords=java;console;monitoring
+Exec=/usr/lib/jvm/java-11-adoptopenjdk/bin/jconsole
+Terminal=false
+Type=Application
+Categories=Application;System;
diff --git a/freedesktop-jshell.desktop b/freedesktop-jshell.desktop
new file mode 100644
index 000000000000..f0f91bf4f0b2
--- /dev/null
+++ b/freedesktop-jshell.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=AdoptOpenJDK Java 11 Shell
+Comment=AdoptOpenJDK Java 11 Shell
+Keywords=java;shell
+Exec=/usr/lib/jvm/java-11-adoptopenjdk/bin/jshell
+Terminal=true
+Type=Application
+Categories=Application;System;
diff --git a/freedesktop-policytool.desktop b/freedesktop-policytool.desktop
new file mode 100644
index 000000000000..7a56f593b360
--- /dev/null
+++ b/freedesktop-policytool.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=AdoptOpenJDK Java 11 Policy Tool
+Comment=AdoptOpenJDK Java 11 Policy Tool
+Keywords=java;security;policytool
+Exec=/usr/lib/jvm/java-11-adoptopenjdk/bin/policytool
+Terminal=false
+Type=Application
+Categories=Settings;
diff --git a/install_jdk-adoptopenjdk.sh b/install_jdk-adoptopenjdk.sh
new file mode 100644
index 000000000000..eaf25f39354c
--- /dev/null
+++ b/install_jdk-adoptopenjdk.sh
@@ -0,0 +1,50 @@
+THIS_JDK='java-11-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
+ "")
+ /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}" ]; 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
+ # Check JRE is still available
+ if [ -x /usr/lib/jvm/${THIS_JDK}/bin/java ]; then
+ /usr/bin/archlinux-java unset
+ fi
+ fi
+}