summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorElierrr2022-01-16 18:33:06 -0500
committerElierrr2022-01-16 18:33:06 -0500
commit6c50e160a2a67e037e8324c71c917313b0783396 (patch)
treedb43a916ea4d2c40f060d048eceb3f7b214cc313
downloadaur-6c50e160a2a67e037e8324c71c917313b0783396.tar.gz
Initial commit
-rw-r--r--.SRCINFO57
-rw-r--r--.gitignore11
-rw-r--r--PKGBUILD99
-rw-r--r--freedesktop-java.desktop9
-rw-r--r--freedesktop-jconsole.desktop8
-rw-r--r--freedesktop-jshell.desktop8
-rw-r--r--install_jdk-temurin.sh50
7 files changed, 242 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7ec4fa1bc3c9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,57 @@
+pkgbase = jdk18-beta-temurin
+ pkgdesc = Temurin (OpenJDK 18 beta Java binaries by Adoptium, formerly AdoptOpenJDK)
+ pkgver = 18.beta27
+ pkgrel = 1
+ url = https://adoptium.net/
+ install = install_jdk-temurin.sh
+ arch = x86_64
+ license = custom
+ depends = java-runtime-common>=3
+ depends = java-environment-common
+ 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=18
+ provides = java-runtime-headless-openjdk=18
+ provides = jre18-openjdk-headless=18.beta27
+ provides = jre-openjdk-headless=18.beta27
+ provides = java-runtime=18
+ provides = java-runtime-openjdk=18
+ provides = jre18-openjdk=18.beta27
+ provides = jre-openjdk=18.beta27
+ provides = java-environment=18
+ provides = java-environment-openjdk=18
+ provides = jdk18-openjdk=18.beta27
+ provides = jdk-openjdk=18.beta27
+ provides = openjdk18-src=18.beta27
+ provides = openjdk-src=18.beta27
+ replaces = jdk-adoptopenjdk
+ backup = etc/java-temurin/logging.properties
+ backup = etc/java-temurin/management/jmxremote.access
+ backup = etc/java-temurin/management/jmxremote.password.template
+ backup = etc/java-temurin/management/management.properties
+ backup = etc/java-temurin/net.properties
+ backup = etc/java-temurin/sdp/sdp.conf.template
+ backup = etc/java-temurin/security/java.policy
+ backup = etc/java-temurin/security/java.security
+ backup = etc/java-temurin/security/policy/limited/default_local.policy
+ backup = etc/java-temurin/security/policy/limited/default_US_export.policy
+ backup = etc/java-temurin/security/policy/limited/exempt_local.policy
+ backup = etc/java-temurin/security/policy/README.txt
+ backup = etc/java-temurin/security/policy/unlimited/default_local.policy
+ backup = etc/java-temurin/security/policy/unlimited/default_US_export.policy
+ backup = etc/java-temurin/sound.properties
+ source = https://github.com/adoptium/temurin18-binaries/releases/download/jdk18-2021-12-15-03-37-beta/OpenJDK18-jdk_x64_linux_hotspot_2021-12-15-03-37.tar.gz
+ source = freedesktop-java.desktop
+ source = freedesktop-jconsole.desktop
+ source = freedesktop-jshell.desktop
+ sha256sums = 279e4e3a116de7b20c890b851e98c8ba504b4292d56b663b88ba43214a6175e2
+ sha256sums = ea75ce65e1393a91fcb83beed3b84759a88bbe9df1ab4efa440062bbd2fe6c1f
+ sha256sums = 36b2ff191c81ce5eef9e1eed2acc54dba78b2bcdf47532607f0cc9302503a265
+ sha256sums = b73453a639017037627d926cf2179d1c7e296d9c0804747848d1c799ca38652c
+
+pkgname = jdk18-beta-temurin
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..63f4f007f419
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# ignore everything
+*
+
+# dont ignore these
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!freedesktop-java.desktop
+!freedesktop-jconsole.desktop
+!freedesktop-jshell.desktop
+!install_jdk-temurin.sh
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6787c30be031
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Elier Lopez <elierrrlg@outlook.com>
+# Contributor: Michael Lass <bevan@bi-co.net>
+# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
+
+_majorver=18
+_buildver=27
+pkgrel=1
+pkgver=${_majorver}.beta${_buildver}
+_tag_ver=2021-12-15-03-37
+
+pkgname=jdk18-beta-temurin
+pkgdesc="Temurin (OpenJDK ${_majorver} beta Java binaries by Adoptium, formerly AdoptOpenJDK)"
+arch=('x86_64')
+url='https://adoptium.net/'
+license=('custom')
+
+depends=('java-runtime-common>=3' 'java-environment-common' '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}")
+replaces=("jdk-adoptopenjdk")
+backup=(etc/java-18-temurin/logging.properties
+ etc/java-18-temurin/management/jmxremote.access
+ etc/java-18-temurin/management/jmxremote.password.template
+ etc/java-18-temurin/management/management.properties
+ etc/java-18-temurin/net.properties
+ etc/java-18-temurin/sdp/sdp.conf.template
+ etc/java-18-temurin/security/java.policy
+ etc/java-18-temurin/security/java.security
+ etc/java-18-temurin/security/policy/limited/default_local.policy
+ etc/java-18-temurin/security/policy/limited/default_US_export.policy
+ etc/java-18-temurin/security/policy/limited/exempt_local.policy
+ etc/java-18-temurin/security/policy/README.txt
+ etc/java-18-temurin/security/policy/unlimited/default_local.policy
+ etc/java-18-temurin/security/policy/unlimited/default_US_export.policy
+ etc/java-18-temurin/sound.properties)
+install=install_jdk-temurin.sh
+
+source=(https://github.com/adoptium/temurin${_majorver}-binaries/releases/download/jdk${_majorver}-${_tag_ver/+/%2B}-beta/OpenJDK${_majorver}-jdk_x64_linux_hotspot_${_tag_ver/+/_}.tar.gz
+ freedesktop-java.desktop
+ freedesktop-jconsole.desktop
+ freedesktop-jshell.desktop)
+sha256sums=('279e4e3a116de7b20c890b851e98c8ba504b4292d56b663b88ba43214a6175e2'
+ 'ea75ce65e1393a91fcb83beed3b84759a88bbe9df1ab4efa440062bbd2fe6c1f'
+ '36b2ff191c81ce5eef9e1eed2acc54dba78b2bcdf47532607f0cc9302503a265'
+ 'b73453a639017037627d926cf2179d1c7e296d9c0804747848d1c799ca38652c')
+
+_jvmdir=/usr/lib/jvm/java-${_majorver}-temurin
+_jdkdir=jdk-${_majorver}+${_buildver}
+
+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/java-18-temurin"
+ ln -sf /etc/java-18-temurin 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/*; do
+ install -Dm 644 "${f}" "${pkgdir}/usr/share/${f/\.1/-temurin${_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 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..19174db96002
--- /dev/null
+++ b/freedesktop-java.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Temurin Java 18 Runtime
+Comment=Temurin Java 18 Runtime
+Keywords=java;runtime
+Exec=/usr/lib/jvm/java-18-temurin/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..ee1b8cbd3ea3
--- /dev/null
+++ b/freedesktop-jconsole.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Temurin Java 18 Console
+Comment=Temurin Java 18 Monitoring & Management Console
+Keywords=java;console;monitoring
+Exec=/usr/lib/jvm/java-18-temurin/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..2de897c65768
--- /dev/null
+++ b/freedesktop-jshell.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Temurin Java 18 Shell
+Comment=Temurin Java 18 Shell
+Keywords=java;shell
+Exec=/usr/lib/jvm/java-18-temurin/bin/jshell
+Terminal=true
+Type=Application
+Categories=Application;System;
diff --git a/install_jdk-temurin.sh b/install_jdk-temurin.sh
new file mode 100644
index 000000000000..e16c1a25f185
--- /dev/null
+++ b/install_jdk-temurin.sh
@@ -0,0 +1,50 @@
+THIS_JDK='java-18-temurin'
+
+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
+}