summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO55
-rw-r--r--PKGBUILD127
-rw-r--r--freedesktop-java.desktop9
-rw-r--r--freedesktop-jconsole.desktop8
-rw-r--r--install_jdk8-openjdk-dcevm.sh50
5 files changed, 249 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5461fb9a6f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,55 @@
+pkgbase = jdk8-openjdk-dcevm
+ pkgdesc = OpenJDK Java 8 development kit with DCEVM patches (Trava build)
+ pkgver = 8.u232.b09
+ pkgrel = 1
+ url = https://github.com/TravaOpenJDK/trava-jdk-8-dcevm
+ install = install_jdk8-openjdk-dcevm.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=8
+ provides = java-runtime-headless-openjdk=8
+ provides = jre8-openjdk-headless=8.u232.b09
+ provides = jre-openjdk-headless=8.u232.b09
+ provides = java-runtime=8
+ provides = java-runtime-openjdk=8
+ provides = jre8-openjdk=8.u232.b09
+ provides = jre-openjdk=8.u232.b09
+ provides = java-environment=8
+ provides = java-environment-openjdk=8
+ provides = jdk8-openjdk=8.u232.b09
+ provides = jdk-openjdk=8.u232.b09
+ provides = openjdk8-src=8.u232.b09
+ provides = openjdk-src=8.u232.b09
+ backup = etc/jdk8-openjdk-dcevm/amd64/jvm.cfg
+ backup = etc/jdk8-openjdk-dcevm/calendars.properties
+ backup = etc/jdk8-openjdk-dcevm/content-types.properties
+ backup = etc/jdk8-openjdk-dcevm/flavormap.properties
+ backup = etc/jdk8-openjdk-dcevm/images/cursors/cursors.properties
+ backup = etc/jdk8-openjdk-dcevm/logging.properties
+ backup = etc/jdk8-openjdk-dcevm/management/jmxremote.access
+ backup = etc/jdk8-openjdk-dcevm/management/jmxremote.password
+ backup = etc/jdk8-openjdk-dcevm/management/management.properties
+ backup = etc/jdk8-openjdk-dcevm/management/snmp.acl
+ backup = etc/jdk8-openjdk-dcevm/net.properties
+ backup = etc/jdk8-openjdk-dcevm/psfont.properties.ja
+ backup = etc/jdk8-openjdk-dcevm/psfontj2d.properties
+ backup = etc/jdk8-openjdk-dcevm/security/java.policy
+ backup = etc/jdk8-openjdk-dcevm/security/java.security
+ backup = etc/jdk8-openjdk-dcevm/sound.properties
+ source = https://github.com/TravaOpenJDK/trava-jdk-8-dcevm/releases/download/dcevm8u232b09/java8-openjdk-dcevm-linux.tar.gz
+ source = freedesktop-java.desktop
+ source = freedesktop-jconsole.desktop
+ sha256sums = SKIP
+ sha256sums = 05b34bc3f9e94639c5678448cb3e1c5df82759ed5b8a984da4560e13e0aba81e
+ sha256sums = d24381a9f670110a3c0b02c5ae0636095418384562204a8a2f4eb7945f4c1a9b
+
+pkgname = jdk8-openjdk-dcevm
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..242dafcfc4f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,127 @@
+# Maintainer: therealfarfetchd <aur@therealfarfetchd.dev>
+
+# Based on jdk11-adoptopenjdk
+
+_majorver=8
+_updatever=232
+_buildver=09
+_tag_ver="${_majorver}u${_updatever}b${_buildver}"
+pkgver="${_majorver}.u${_updatever}.b${_buildver}"
+pkgrel=1
+
+pkgname='jdk8-openjdk-dcevm'
+pkgdesc='OpenJDK Java 8 development kit with DCEVM patches (Trava build)'
+arch=('x86_64')
+url='https://github.com/TravaOpenJDK/trava-jdk-8-dcevm'
+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}/amd64/jvm.cfg
+ etc/${pkgname}/calendars.properties
+ etc/${pkgname}/content-types.properties
+ etc/${pkgname}/flavormap.properties
+ etc/${pkgname}/images/cursors/cursors.properties
+ etc/${pkgname}/logging.properties
+ etc/${pkgname}/management/jmxremote.access
+ etc/${pkgname}/management/jmxremote.password
+ etc/${pkgname}/management/management.properties
+ etc/${pkgname}/management/snmp.acl
+ etc/${pkgname}/net.properties
+ etc/${pkgname}/psfont.properties.ja
+ etc/${pkgname}/psfontj2d.properties
+ etc/${pkgname}/security/java.policy
+ etc/${pkgname}/security/java.security
+ etc/${pkgname}/sound.properties
+)
+
+install='install_jdk8-openjdk-dcevm.sh'
+
+source=(
+ https://github.com/TravaOpenJDK/trava-jdk-8-dcevm/releases/download/dcevm${_tag_ver}/java8-openjdk-dcevm-linux.tar.gz
+ freedesktop-java.desktop
+ freedesktop-jconsole.desktop
+)
+
+sha256sums=(
+ 'SKIP'
+ '05b34bc3f9e94639c5678448cb3e1c5df82759ed5b8a984da4560e13e0aba81e'
+ 'd24381a9f670110a3c0b02c5ae0636095418384562204a8a2f4eb7945f4c1a9b'
+)
+
+_jvmdir=/usr/lib/jvm/java-${_majorver}-openjdk-dcevm
+_jdkdir=dcevm${_tag_ver}
+
+package() {
+ install -dm 755 "${pkgdir}${_jvmdir}"
+ cp -a "${srcdir}/${_jdkdir}"/* "${pkgdir}${_jvmdir}"
+
+ cd "${pkgdir}${_jvmdir}"
+
+ # Legal
+ install -dm 755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ mv LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ ln -sf /usr/share/licenses/${pkgname}/LICENSE LICENSE
+
+ # 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 jre/lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts jre/lib/security/cacerts
+
+ # Set config files
+ mv "${pkgdir}${_jvmdir}"/jre/lib/management/jmxremote.password{.template,}
+ mv "${pkgdir}${_jvmdir}"/jre/lib/management/snmp.acl{.template,}
+
+ # Move config files that were set in backup from ./lib to /etc
+ for file in ${backup[@]}; do
+ _filepkgpath=${_jvmdir}/jre/lib/${file#etc/${pkgname}/}
+ install -D -m 644 "${pkgdir}${_filepkgpath}" "${pkgdir}/${file}"
+ ln -sf /${file} "${pkgdir}${_filepkgpath}"
+ done
+
+ # Deduplicate binaries
+ cd bin
+ for file in $(ls); do
+ if [ -e ../jre/bin/${file} ]; then
+ ln -sf ../jre/bin/${file} ${file}
+ fi
+ done
+ cd ..
+
+ # Desktop files
+ for f in jconsole java; 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 00000000000..a24ba1d6f16
--- /dev/null
+++ b/freedesktop-java.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=OpenJDK with DCEVM Java 8 Runtime
+Comment=OpenJDK with DCEVM Java 8 Runtime
+Keywords=java;runtime
+Exec=/usr/lib/jvm/java-8-openjdk-dcevm/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 00000000000..1d33d0754b4
--- /dev/null
+++ b/freedesktop-jconsole.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=OpenJDK with DCEVM Java 8 Console
+Comment=OpenJDK with DCEVM Java 8 Monitoring & Management Console
+Keywords=java;console;monitoring
+Exec=/usr/lib/jvm/java-8-openjdk-dcevm/bin/jconsole
+Terminal=false
+Type=Application
+Categories=Application;System;
diff --git a/install_jdk8-openjdk-dcevm.sh b/install_jdk8-openjdk-dcevm.sh
new file mode 100644
index 00000000000..6af428fab29
--- /dev/null
+++ b/install_jdk8-openjdk-dcevm.sh
@@ -0,0 +1,50 @@
+THIS_JDK='java-8-openjdk-dcevm'
+
+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
+}