summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDet2018-09-27 22:42:00 +0300
committerDet2018-09-27 22:42:00 +0300
commit223f6775f7539fbede5f0bb43ad5faf4de9cbd94 (patch)
tree3e68a36ff9086044cd5ec49da65213f8f53d864e
downloadaur-223f6775f7539fbede5f0bb43ad5faf4de9cbd94.tar.gz
Upgpkg: 10.0.2
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD125
-rw-r--r--jconsole.desktop8
-rw-r--r--jdk10.install74
-rw-r--r--jmc.desktop8
-rw-r--r--policytool.desktop8
6 files changed, 271 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b3f09038d0c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = jdk10
+ pkgdesc = Oracle Java Development Kit
+ pkgver = 10.0.2
+ pkgrel = 1
+ url = http://www.oracle.com/technetwork/java/javase/downloads/index.html
+ install = jdk10.install
+ arch = x86_64
+ license = custom:Oracle
+ depends = ca-certificates-java
+ depends = hicolor-icon-theme
+ 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=10
+ provides = java-runtime-headless=10
+ provides = java-web-start=10
+ provides = java-environment=10
+ provides = java-runtime-jre=10
+ provides = java-runtime-headless-jre=10
+ provides = java-web-start-jre=10
+ provides = java-environment-jdk=10
+ provides = java-openjfx=10
+ provides = jdk10
+ conflicts = jdk10
+ options = !strip
+ backup = etc/java-jdk10/management/jmxremote.access
+ backup = etc/java-jdk10/management/management.properties
+ backup = etc/java-jdk10/security/java.policy
+ backup = etc/java-jdk10/security/java.security
+ backup = etc/java-jdk10/security/javaws.policy
+ backup = etc/java-jdk10/logging.properties
+ backup = etc/java-jdk10/net.properties
+ backup = etc/java-jdk10/sound.properties
+ source = http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz
+ source = jconsole.desktop
+ source = jmc.desktop
+ source = policytool.desktop
+ sha256sums = 6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b
+ sha256sums = 7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034
+ sha256sums = bef07cdacef3e25137ac6ec394f09bb683c3ceb30b894f4b0c5ea40b0f87e4d5
+ sha256sums = 79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1
+
+pkgname = jdk10
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7f2e99300e5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,125 @@
+# Maintainer: Det <nimetonmaili g-mail>
+
+_pkgname=jdk
+pkgname=jdk10
+pkgver=10.0.2
+_major=${pkgver/.*}
+_build=13
+_hash=19aef61b38124481863b1413dce1855f
+_jname=${_pkgname}${_major}
+pkgrel=1
+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"
+ "java-openjfx=$_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/security/javaws.policy"
+ "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"
+ 'jconsole.desktop'
+ 'jmc.desktop'
+ 'policytool.desktop')
+sha256sums=('6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b'
+ '7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034'
+ 'bef07cdacef3e25137ac6ec394f09bb683c3ceb30b894f4b0c5ea40b0f87e4d5'
+ '79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1')
+
+DLAGENTS=('http::/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 "Removing redundancies..."
+ rm -r lib/desktop/icons/HighContrast
+ rm -r lib/desktop/icons/HighContrastInverse
+ rm -r lib/desktop/icons/LowContrast
+ rm lib/fontconfig.*.bfc
+ rm lib/fontconfig.*.properties.src
+
+ 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
+
+ # Fix bundled .desktops
+ sed -e "s|Exec=|Exec=$_jvmdir/bin/|" \
+ -e "s|.png|-$_jname.png|" \
+ -i lib/desktop/applications/*
+
+ # Move .desktops + icons to /usr/share
+ mv lib/desktop/* "$pkgdir"/usr/share/
+ install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/
+
+ # Suffix .desktops + icons (sun-jcontrol.png -> sun-jcontrol-$_jname.png)
+ for i in $(find "$pkgdir"/usr/share/ -type f); do
+ rename -- "." "-$_jname." $i
+ done
+
+ # Write versions to .desktops + .install
+ sed -i "s/<version>/$_major/" "$pkgdir"/usr/share/applications/* "$startdir"/$pkgname.install
+
+ # Link missing icons
+ for i in $(find "$pkgdir"/usr/share/icons/ -name "sun-jcontrol-$_jname.png" -type f); do
+ ln -s "sun-jcontrol-$_jname.png" "${i/jcontrol/java}"
+ ln -s "sun-jcontrol-$_jname.png" "${i/jcontrol/javaws}"
+ done
+
+ # 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
+}
diff --git a/jconsole.desktop b/jconsole.desktop
new file mode 100644
index 00000000000..2e70639ac44
--- /dev/null
+++ b/jconsole.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-<version>-jdk/bin/jconsole
+Icon=sun-java-jdk<version>
+Name=Java <version> Monitoring and Management Console
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/jdk10.install b/jdk10.install
new file mode 100644
index 00000000000..abec489109f
--- /dev/null
+++ b/jdk10.install
@@ -0,0 +1,74 @@
+VERSION='<version>'
+THIS_JAVA="java-${VERSION}-jdk"
+NAME="JDK ${VERSION}"
+
+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"
+}
+
+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"
+}
+
+post_upgrade() {
+ post_install
+}
+
+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
+ fi
+}
diff --git a/jmc.desktop b/jmc.desktop
new file mode 100644
index 00000000000..25e457332e1
--- /dev/null
+++ b/jmc.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-<version>-jdk/bin/jmc
+Icon=sun-java-jdk<version>
+Name=Java <version> Mission Control
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/policytool.desktop b/policytool.desktop
new file mode 100644
index 00000000000..a1f5170fba5
--- /dev/null
+++ b/policytool.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-<version>-jdk/bin/policytool
+Icon=sun-java-jdk<version>
+Name=Java <version> Policy Settings
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Settings;Java;