summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD141
-rw-r--r--java.desktop27
-rw-r--r--jconsole.desktop11
-rw-r--r--jdk.install102
-rw-r--r--jshell.desktop9
6 files changed, 122 insertions, 210 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c611b880c4d..8f37d675603 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,46 +1,28 @@
pkgbase = jdk
pkgdesc = Oracle Java Development Kit
pkgver = 11.0.1
- pkgrel = 1
- url = http://www.oracle.com/technetwork/java/javase/downloads/index.html
+ pkgrel = 2
+ url = https://www.oracle.com/java/
install = jdk.install
arch = x86_64
- license = custom:Oracle
- depends = ca-certificates-java
- depends = hicolor-icon-theme
+ license = custom
depends = java-environment-common
- depends = java-runtime-common
- depends = nss
- depends = xdg-utils
- optdepends = alsa-lib: for basic sound support
- optdepends = eclipse-java: to use "Oracle Java Mission Control" plugins in Eclipse
- optdepends = gtk2: for Gtk+ look and feel (desktop)
- provides = java-runtime=11
- provides = java-runtime-headless=11
- provides = java-web-start=11
+ depends = jre>=11
+ depends = jre<12
+ depends = zlib
+ depends = hicolor-icon-theme
provides = java-environment=11
- provides = java-runtime-jre=11
- provides = java-runtime-headless-jre=11
- provides = java-web-start-jre=11
provides = java-environment-jdk=11
- provides = jdk11
- conflicts = jdk11
- options = !strip
- backup = etc/java-jdk11/management/jmxremote.access
- backup = etc/java-jdk11/management/management.properties
- backup = etc/java-jdk11/security/java.policy
- backup = etc/java-jdk11/security/java.security
- backup = etc/java-jdk11/logging.properties
- backup = etc/java-jdk11/net.properties
- backup = etc/java-jdk11/sound.properties
- source = http://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.tar.gz
+ source = https://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.tar.gz
source = java.desktop
source = jconsole.desktop
+ source = jshell.desktop
source = java_16.png
source = java_48.png
sha256sums = e7fd856bacad04b6dbf3606094b6a81fa9930d6dbb044bbd787be7ea93abc885
- sha256sums = a7514af04107ed225ebafefd9997ee0332e8ecc4ef12a7dec5aaff7e8a2385d1
- sha256sums = f0a863cfdf57e963d74a84b914096c79951e7a6001a35370acf4bebfc5f4a081
+ sha256sums = 1052634cdcbf50ca14b864b58f3afa53de1706bdc9c593667c29974146212c54
+ sha256sums = 9a84d1b4dd969e867b2dbb6df0d0c44814729e0f1d0c61ab6c54d676eae83b3b
+ sha256sums = 73d686fd6e478a887a51451d7ada7c045f31ce299f65f45e50a793820ee99d85
sha256sums = d27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed
sha256sums = 7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176
diff --git a/PKGBUILD b/PKGBUILD
index 87f07b93584..52e8402f91b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,108 +1,67 @@
-# Maintainer: Det <nimetonmaili g-mail>
+# Maintainer : Daniel Bermond < gmail-com: danielbermond >
+# Contributor: Det <nimetonmaili g-mail>
pkgname=jdk
pkgver=11.0.1
-_major=${pkgver/.*}
_build=13
_hash=90cf5d8f270a4347a95050320eef3fb7
-_jname=${pkgname}${_major}
-pkgrel=1
-pkgdesc="Oracle Java Development Kit"
+_majver="${pkgver%%.*}"
+_next="$((_majver + 1))"
+pkgrel=2
+pkgdesc='Oracle Java Development Kit'
arch=('x86_64')
-url="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
-license=('custom:Oracle')
-depends=('ca-certificates-java' 'hicolor-icon-theme' 'java-environment-common' 'java-runtime-common' 'nss' 'xdg-utils')
-optdepends=('alsa-lib: for basic sound support'
- 'eclipse-java: to use "Oracle Java Mission Control" plugins in Eclipse'
- 'gtk2: for Gtk+ look and feel (desktop)')
-provides=("java-runtime=$_major" "java-runtime-headless=$_major" "java-web-start=$_major" "java-environment=$_major"
- "java-runtime-jre=$_major" "java-runtime-headless-jre=$_major" "java-web-start-jre=$_major" "java-environment-jdk=$_major"
- "$_jname")
-conflicts=("$_jname")
-_jvmdir=/usr/lib/jvm/java-$_major-$pkgname
-backup=("etc/java-$_jname/management/jmxremote.access"
- "etc/java-$_jname/management/management.properties"
- "etc/java-$_jname/security/java.policy"
- "etc/java-$_jname/security/java.security"
- "etc/java-$_jname/logging.properties"
- "etc/java-$_jname/net.properties"
- "etc/java-$_jname/sound.properties")
-options=('!strip') # JDK debug-symbols
-install=$pkgname.install
-source=("http://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/${pkgname}-${pkgver}_linux-x64_bin.tar.gz"
+url='https://www.oracle.com/java/'
+license=('custom')
+depends=('java-environment-common' "jre>=${_majver}" "jre<${_next}" 'zlib' 'hicolor-icon-theme')
+provides=("java-environment=${_majver}" "java-environment-jdk=${_majver}")
+install="${pkgname}.install"
+source=("https://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/${pkgname}-${pkgver}_linux-x64_bin.tar.gz"
'java.desktop'
'jconsole.desktop'
+ 'jshell.desktop'
'java_16.png'
'java_48.png')
sha256sums=('e7fd856bacad04b6dbf3606094b6a81fa9930d6dbb044bbd787be7ea93abc885'
- 'a7514af04107ed225ebafefd9997ee0332e8ecc4ef12a7dec5aaff7e8a2385d1'
- 'f0a863cfdf57e963d74a84b914096c79951e7a6001a35370acf4bebfc5f4a081'
+ '1052634cdcbf50ca14b864b58f3afa53de1706bdc9c593667c29974146212c54'
+ '9a84d1b4dd969e867b2dbb6df0d0c44814729e0f1d0c61ab6c54d676eae83b3b'
+ '73d686fd6e478a887a51451d7ada7c045f31ce299f65f45e50a793820ee99d85'
'd27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed'
'7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176')
-DLAGENTS=('http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u')
+DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u')
package() {
- cd $pkgname-$pkgver
-
- msg2 "Creating directory structure..."
- install -d "$pkgdir"/etc/.java/.systemPrefs
- install -d "$pkgdir"/usr/lib/jvm/java-$_major-$pkgname/bin
- install -d "$pkgdir"/usr/lib/mozilla/plugins
- install -d "$pkgdir"/usr/share/licenses/java$_major-$pkgname
-
- msg2 "Moving contents..."
- mv * "$pkgdir"/$_jvmdir
-
- # Cd to the new playground
- cd "$pkgdir"/$_jvmdir
-
- msg2 "Fixing directory structure..."
- # Create a placeholder 'jre' link
- ln -s . jre
-
- # Move + suffix .desktops
- for i in $(printf -- '%s\n' "${source[@]}" | grep desktop | cut -d "." -f1); do
- install -Dm644 "$srcdir"/$i.desktop "$pkgdir"/usr/share/applications/$i-$_jname.desktop
- done
-
- # Move + suffix icons
- for i in 16 48; do
- install -Dm644 "$srcdir"/java_$i.png "$pkgdir"/usr/share/icons/hicolor/${i}x$i/apps/java-$_jname.png
- done
-
- # Write versions to .desktops + .install
- sed -i "s/<version>/$_major/" "$pkgdir"/usr/share/applications/* "$startdir"/$pkgname.install
-
- # Move confs to /etc and link back to /usr: /usr/lib/jvm/java-$_jname/conf -> /etc
- for sub_path in $(find conf/ -type f); do
- # New location
- new_etc_path="/etc/java-$_jname/${sub_path/conf\/}"
-
- # Move & link
- install -Dm644 "$sub_path" "$pkgdir/$new_etc_path"
- ln -sf "$new_etc_path" "$sub_path"
- done
-
- # Link NPAPI plugin
- ln -sf $_jvmdir/lib/libnpjp2.so "$pkgdir"/usr/lib/mozilla/plugins/libnpjp2-$_jname.so
-
- # Replace JKS keystore with 'ca-certificates-java'
- ln -sf /etc/ssl/certs/java/cacerts lib/security/cacerts
-
- # Move & link licenses
- mv legal/ "$pkgdir"/usr/share/licenses/java$_major-$pkgname/
- ln -sf /usr/share/licenses/java$_major-$pkgname/ "$pkgdir"/usr/share/licenses/$pkgname
-
- msg2 "Enabling copy+paste in unsigned applets..."
- # Copy/paste from system clipboard to unsigned Java applets has been disabled since 6u24:
- # - https://blogs.oracle.com/kyle/entry/copy_and_paste_in_java
- # - http://slightlyrandombrokenthoughts.blogspot.com/2011/03/oracle-java-applet-clipboard-injection.html
- _line=$(awk '/permission/{a=NR}; END{print a}' "$pkgdir"/etc/java-$_jname/security/java.policy)
- sed "$_line a\\\\n \
- // (AUR) Allow unsigned applets to read system clipboard, see:\n \
- // - https://blogs.oracle.com/kyle/entry/copy_and_paste_in_java\n \
- // - http://slightlyrandombrokenthoughts.blogspot.com/2011/03/oracle-java-applet-clipboard-injection.html\n \
- permission java.awt.AWTPermission \"accessClipboard\";" \
- -i "$pkgdir"/etc/java-$_jname/security/java.policy
+ cd "jdk-${pkgver}"
+
+ local _jvmdir="/usr/lib/jvm/java-${_majver}-${pkgname}"
+
+ install -d -m755 "${pkgdir}/${_jvmdir}"
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # bin
+ cp -a bin "${pkgdir}/${_jvmdir}"
+ rm "${pkgdir}/${_jvmdir}/bin/"{java,jjs,jrunscript,keytool,pack200}
+ rm "${pkgdir}/${_jvmdir}/bin/"{rmid,rmiregistry,unpack200}
+
+ # libs
+ install -D -m644 lib/ct.sym -t "${pkgdir}/${_jvmdir}/lib"
+ install -D -m644 lib/libattach.so -t "${pkgdir}/${_jvmdir}/lib"
+ install -D -m644 lib/libsaproc.so -t "${pkgdir}/${_jvmdir}/lib"
+ cp -a lib/jfr "${pkgdir}/${_jvmdir}/lib"
+
+ cp -a include "${pkgdir}/${_jvmdir}"
+ cp -a jmods "${pkgdir}/${_jvmdir}"
+
+ install -D -m644 lib/src.zip -t "${pkgdir}/${_jvmdir}/lib"
+
+ # desktop and icons
+ install -D -m644 "${srcdir}/java.desktop" -t "${pkgdir}/usr/share/applications"
+ install -D -m644 "${srcdir}/jconsole.desktop" -t "${pkgdir}/usr/share/applications"
+ install -D -m644 "${srcdir}/jshell.desktop" -t "${pkgdir}/usr/share/applications"
+ install -D -m644 "${srcdir}/java_16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/java${_majver}-jdk.png"
+ install -D -m644 "${srcdir}/java_48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/java${_majver}-jdk.png"
+
+ # legal/licenses
+ cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}"
+ ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java${_majver}-${pkgname}"
}
diff --git a/java.desktop b/java.desktop
index 8d7ccbb5df7..1c3cf4e50ab 100644
--- a/java.desktop
+++ b/java.desktop
@@ -1,25 +1,10 @@
-#
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-# Use is subject to license terms.
-#
-# Desktop entry for automatic execution of files identified as either the
-# x-jar or x-java-archive (historical) mime type.
-#
-# Note: This file may be installed under both "control-center-2.0" and
-# "applications". Depending upon the version of GNOME, the copy in
-# "applications" may take precedence.
-#
-# One might be tempted to add "Java" to the Catergories, but the definition
-# is "uses Swing/ATW" whhich may not be true.
-#
[Desktop Entry]
-Encoding=UTF-8
-Name=Java
-Comment=Java Virtual Machine
-Exec=/usr/lib/jvm/java-<version>-jdk/bin/java -jar
-Icon=java-jdk<version>
+Name=Oracle Java 11 Runtime
+Comment=Oracle Java 11 Runtime
+Keywords=java;runtime
+Exec=/usr/lib/jvm/java-11-jdk/bin/java -jar
Terminal=false
Type=Application
+Icon=java11-jdk
+MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true
-Categories=Applications;
-MimeType=application/x-java-archive;application/x-jar;
diff --git a/jconsole.desktop b/jconsole.desktop
index 2bd7f7fb4d5..f2b689b9b2f 100644
--- a/jconsole.desktop
+++ b/jconsole.desktop
@@ -1,8 +1,9 @@
[Desktop Entry]
-Name=Java Monitoring and Management Console
-Exec=/usr/lib/jvm/java-<version>-jdk/bin/jconsole
-Icon=java-jdk<version>
-StartupNotify=true
+Name=Oracle Java 11 Console
+Comment=Oracle Java 11 Monitoring and Management Console
+Keywords=java;console;monitoring
+Exec=/usr/lib/jvm/java-11-jdk/bin/jconsole
Terminal=false
Type=Application
-Categories=Development;Java;
+Icon=java11-jdk
+Categories=Application;System;
diff --git a/jdk.install b/jdk.install
index 8dc4231f5b4..e8adb3282b5 100644
--- a/jdk.install
+++ b/jdk.install
@@ -1,74 +1,50 @@
-VERSION='<version>'
-THIS_JAVA="java-${VERSION}-jdk"
-NAME='JDK'
-
-all_off="$(tput sgr0)"
-bold="${all_off}$(tput bold)"
-blue="${bold}$(tput setaf 4)"
-yellow="${bold}$(tput setaf 3)"
-
-note() {
- printf "${blue}::${yellow} archlinux-java:${bold} $1${all_off}\n"
-}
-
-note2() {
- printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
+THIS_JDK='java-11-jdk'
+
+fix_default() {
+ if [ ! -x /usr/bin/java ]; then
+ /usr/bin/archlinux-java unset
+ echo ""
+ else
+ /usr/bin/archlinux-java get
+ fi
}
post_install() {
- default=$(archlinux-java get)
- case ${default} in
- "")
- archlinux-java set ${THIS_JAVA}
- note "${NAME} ('${THIS_JAVA}') set as default Java environment."
- ;;
- ${THIS_JAVA})
- note "${NAME} ('${THIS_JAVA}') set as default Java environment."
- ;;
- *)
- note "Default Java environment already set to '${default}'.
- To use ${NAME} ('${THIS_JAVA}'), run:
- # archlinux-java set ${THIS_JAVA}
- For status, use:
- $ archlinux-java status"
- ;;
- esac
-
- if [[ ! -f /etc/ssl/certs/java/cacerts ]]; then
- update-ca-trust
- fi
-
- note2 "Since Oracle Java 9, some Qt 5 applications (such as the reader apps Zeal and
- GoldenDict) will crash due to the existance of the Java NPAPI plugin symlink
- (/usr/lib/mozilla/plugins/libnpjp2-jdk${VERSION}.so).
-
- See:
- - https://github.com/zealdocs/zeal/issues/802
- - https://bbs.archlinux.org/viewtopic.php?id=231222"
+ 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() {
- post_install
+ 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() {
- default=$(archlinux-java get)
- if [[ ${default} = ${THIS_JAVA} ]]; then
- archlinux-java unset
- fi
-}
-
-post_remove() {
- default=$(archlinux-java get) # reassign
- if [[ ${default} ]]; then
- note "Default Java environment is '${default}'."
- else
- archlinux-java fix
- default=$(archlinux-java get) # re-reassign
- if [[ ${default} ]]; then
- note "Default Java environment left as '${default}'."
- else
- note "Java environment unset."
- fi
+ if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then
+ # Check JRE11 is still available
+ if [ -x /usr/lib/jvm/${THIS_JDK}/bin/java ]; then
+ /usr/bin/archlinux-java unset
fi
+ fi
}
diff --git a/jshell.desktop b/jshell.desktop
new file mode 100644
index 00000000000..83fb1edf95e
--- /dev/null
+++ b/jshell.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Oracle Java 11 Shell
+Comment=Oracle Java 11 Shell
+Keywords=java;shell
+Exec=/usr/lib/jvm/java-11-jdk/bin/jshell
+Terminal=true
+Type=Application
+Icon=java11-jdk
+Categories=Application;System;