From ad3e05cfeb76ed2eae05c907bf556708ca61a819 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Thu, 19 Apr 2018 08:49:44 -0400 Subject: [PATCH] Update jdks + idea --- src/intellij-idea-ultimate-edition/PKGBUILD | 6 +- src/jdk-devel/PKGBUILD | 175 ++++++++--------- src/jdk-devel/jconsole-jdk10.desktop | 8 - src/jdk-devel/jconsole.desktop | 8 + src/jdk-devel/jdk-devel.install | 5 +- src/jdk-devel/jmc-jdk10.desktop | 8 - src/jdk-devel/jmc.desktop | 8 + src/jdk-devel/jvisualvm-jdk10.desktop | 9 - src/jdk-devel/policytool-jdk10.desktop | 8 - src/jdk-devel/policytool.desktop | 8 + src/jdk/PKGBUILD | 180 ++++++++---------- ...jconsole-jdk9.desktop => jconsole.desktop} | 4 +- src/jdk/jdk.install | 5 +- src/jdk/{jmc-jdk9.desktop => jmc.desktop} | 4 +- src/jdk/jvisualvm-jdk9.desktop | 9 - ...cytool-jdk9.desktop => policytool.desktop} | 4 +- 16 files changed, 195 insertions(+), 254 deletions(-) delete mode 100644 src/jdk-devel/jconsole-jdk10.desktop create mode 100644 src/jdk-devel/jconsole.desktop delete mode 100644 src/jdk-devel/jmc-jdk10.desktop create mode 100644 src/jdk-devel/jmc.desktop delete mode 100644 src/jdk-devel/jvisualvm-jdk10.desktop delete mode 100644 src/jdk-devel/policytool-jdk10.desktop create mode 100644 src/jdk-devel/policytool.desktop rename src/jdk/{jconsole-jdk9.desktop => jconsole.desktop} (64%) rename src/jdk/{jmc-jdk9.desktop => jmc.desktop} (62%) delete mode 100644 src/jdk/jvisualvm-jdk9.desktop rename src/jdk/{policytool-jdk9.desktop => policytool.desktop} (60%) diff --git a/src/intellij-idea-ultimate-edition/PKGBUILD b/src/intellij-idea-ultimate-edition/PKGBUILD index 570058b..4c1fe45 100644 --- a/src/intellij-idea-ultimate-edition/PKGBUILD +++ b/src/intellij-idea-ultimate-edition/PKGBUILD @@ -2,8 +2,8 @@ pkgbase=intellij-idea-ultimate-edition pkgname=(intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre) -pkgver=2017.3.4 -_buildver=173.4548.28 +pkgver=2018.1.1 +_buildver=181.4445.78 pkgrel=1 arch=('any') pkgdesc="An intelligent IDE for Java, Groovy and other programming languages with advanced refactoring features intensely focused on developer productivity." @@ -12,7 +12,7 @@ license=('Commercial') options=(!strip) source=("https://download.jetbrains.com/idea/ideaIU-$pkgver.tar.gz" "jetbrains-idea.desktop") -sha256sums=('d1f33796fa317c04e0618a9bd329f944355c3374011815c398384ca5cc57bfbc' +sha256sums=('259ede8f233bdde5435ac2c800423428a4692e489fe4d764667c90a246ab0629' '83af2ba8f9f14275a6684e79d6d4bd9b48cd852c047dacfc81324588fa2ff92b') prepare() { diff --git a/src/jdk-devel/PKGBUILD b/src/jdk-devel/PKGBUILD index 50c8ff8..1ec2a3f 100644 --- a/src/jdk-devel/PKGBUILD +++ b/src/jdk-devel/PKGBUILD @@ -2,8 +2,9 @@ _pkgname=jdk pkgname=jdk-devel -_major=10 -_build=43 +_major=11 +_build=10 +_jname=${_pkgname}${_major} pkgver=${_major}b${_build} pkgrel=1 pkgdesc="Oracle Java $_major Development Kit Snapshot" @@ -16,130 +17,112 @@ optdepends=('alsa-lib: for basic sound support' '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") -conflicts=("java-runtime-jre=$_major" "java-environment-jdk=$_major") - -# Variables -_jname=${_pkgname}${_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/fontconfig.properties.src" "etc/java-$_jname/logging.properties" "etc/java-$_jname/net.properties" - "etc/java-$_jname/psfont.properties.ja" - "etc/java-$_jname/psfontj2d.properties" "etc/java-$_jname/sound.properties") options=('!strip') # JDK debug-symbols install=$pkgname.install -source=("https://download.java.net/java/jdk${_major}/archive/${_build}/BCL/${_pkgname}-${_major}+${_build}_linux-x64_bin.tar.gz" - "jconsole-$_jname.desktop" - "jmc-$_jname.desktop" - "jvisualvm-$_jname.desktop" - "policytool-$_jname.desktop" +source=("https://download.java.net/java/early_access/jdk${_major}/${_build}/BCL/${_pkgname}-${_major}-ea+${_build}_linux-x64_bin.tar.gz" + "jconsole.desktop" + "jmc.desktop" + "policytool.desktop" 'LICENSE-Early-Adopter-Development-Agreement.txt') -sha256sums=('ecfa54b83f7df99eeb838e0a162eb4cb1043c6cc78e0abf8b651aaac5a54d841' - '2e429abf6f14f506f8caa643eeed10921ef3c9b6820850778822f6e95a5fc956' - 'c163f149154d8a3f76ba916d49215673f3056595d857b2f2b7074e88496bbd32' - 'fd519f3ffb9ff649ae1c39674d247d9d26af2befb4ac557e885e84c3c4669950' - '2dfc037e6ffc5a2bba31afe44a6a0e1e6e4eb7bb105256793372a21083b1e3be' +sha256sums=('7d0268f2493fdc9607b665c0cb9bede7ff207d173908965dc7429ef32b90a18f' + '7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034' + 'bef07cdacef3e25137ac6ec394f09bb683c3ceb30b894f4b0c5ea40b0f87e4d5' + '79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1' '36d48f14c16f0dcc98a8ce2301fd2a111701e6f59a7da08b0e51fdb3e2f9ca89') package() { - cd $_pkgname-$_major + cd $_pkgname-$_major - 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 "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 "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 + msg2 "Moving contents..." + mv * "$pkgdir"/$_jvmdir - # Cd to the new playground - cd "$pkgdir"/$_jvmdir + # Cd to the new playground + cd "$pkgdir"/$_jvmdir - # Create a placeholder 'jre' link - ln -s . jre + msg2 "Fixing directory structure..." + # Create a placeholder 'jre' link + ln -s . jre - msg2 "Fixing directory structure..." - # Suffix .desktops + icon (sun-jcontrol.png -> sun-jcontrol-$_jname.png) - for i in $(find lib/desktop/ -type f); do - rename -- "." "-$_jname." $i - done + # Fix bundled .desktops + sed -e '/JavaWS/!s|Name=Java|Name=Java '"$_major"'|' \ + -e "s|Name=JavaWS|Name=JavaWS $_major|" \ + -e "s|Comment=Java|Comment=Java $_major|" \ + -e "s|Exec=|Exec=$_jvmdir/bin/|" \ + -e "s|.png|-$_jname.png|" \ + -i lib/desktop/applications/* - # Link missing icons - for i in $(find lib/desktop/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 .desktops + icons to /usr/share + mv lib/desktop/* "$pkgdir"/usr/share/ + install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/ - # Fix .desktop's - sed -e '/JavaWS/!s|Name=Java|Name=Java '"$_major"'|' \ - -e "s|Name=JavaWS|Name=JavaWS $_major|" \ - -e "s|Comment=Java|Comment=Java $_major|" \ - -e "s|Exec=|Exec=$_jvmdir/bin/|" \ - -e "s|.png|-$_jname.png|" \ - -i lib/desktop/applications/* + # Suffix .desktops + icon (sun-jcontrol.png -> sun-jcontrol-$_jname.png) + for i in $(find "$pkgdir"/usr/share/ -type f); do + rename -- "." "-$_jname." $i + done - # Move .desktops + icons to /usr/share - mv lib/desktop/* "$pkgdir"/usr/share/ - install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/ + # Write versions to .desktops + .install + sed -i "s//$_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 old_usr_path in $(find conf/ -type f); do - # New location - new_etc_path="/etc/java-$_jname/${old_usr_path/conf\/}" + # 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 /link - install -Dm644 "$old_usr_path" "$pkgdir/$new_etc_path" - ln -sf "$new_etc_path" "$old_usr_path" - 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 confs to /etc and link back to /usr: /usr/lib/jvm/java-$_jname/lib -> /etc - for new_etc_path in ${backup[@]}; do - # Old location - old_usr_path="lib/${new_etc_path#*$_jname/}" + # Move & link + install -Dm644 "$sub_path" "$pkgdir/$new_etc_path" + ln -sf "$new_etc_path" "$sub_path" + done - # Move/link - if [[ -f $old_usr_path ]]; then - install -Dm644 "$old_usr_path" "$pkgdir/$new_etc_path" - ln -sf "/$new_etc_path" "$old_usr_path" - fi - done + # Link NPAPI plugin + ln -sf $_jvmdir/lib/libnpjp2.so "$pkgdir"/usr/lib/mozilla/plugins/libnpjp2-$_jname.so - # 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 - # 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/ + install -m644 "$srcdir"/LICENSE-Early-Adopter-Development-Agreement.txt "$pkgdir"/usr/share/licenses/java$_major-$_pkgname/ + ln -sf /usr/share/licenses/java$_major-$_pkgname/ "$pkgdir"/usr/share/licenses/$pkgname - # Move/link licenses - mv legal/ "$pkgdir"/usr/share/licenses/java$_major-$_pkgname/ - install -m644 "$srcdir"/LICENSE-Early-Adopter-Development-Agreement.txt "$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\";" \ + 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/src/jdk-devel/jconsole-jdk10.desktop b/src/jdk-devel/jconsole-jdk10.desktop deleted file mode 100644 index c2c9f59..0000000 --- a/src/jdk-devel/jconsole-jdk10.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Exec=/usr/lib/jvm/java-10-jdk/bin/jconsole -Icon=sun-java-jdk10 -Name=Java 10 Monitoring and Management Console -StartupNotify=true -Terminal=false -Type=Application -Categories=Development;Java; diff --git a/src/jdk-devel/jconsole.desktop b/src/jdk-devel/jconsole.desktop new file mode 100644 index 0000000..2e70639 --- /dev/null +++ b/src/jdk-devel/jconsole.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=/usr/lib/jvm/java--jdk/bin/jconsole +Icon=sun-java-jdk +Name=Java Monitoring and Management Console +StartupNotify=true +Terminal=false +Type=Application +Categories=Development;Java; diff --git a/src/jdk-devel/jdk-devel.install b/src/jdk-devel/jdk-devel.install index c1c188d..1e90a7b 100644 --- a/src/jdk-devel/jdk-devel.install +++ b/src/jdk-devel/jdk-devel.install @@ -1,4 +1,5 @@ -THIS_JAVA='java-10-jdk' +VERSION='' +THIS_JAVA='java-${VERSION}-jdk' NAME='JDK Devel' all_off="$(tput sgr0)" @@ -39,7 +40,7 @@ post_install() { 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-jdk10.so). + (/usr/lib/mozilla/plugins/libnpjp2-jdk${VERSION}.so). See: - https://github.com/zealdocs/zeal/issues/802 diff --git a/src/jdk-devel/jmc-jdk10.desktop b/src/jdk-devel/jmc-jdk10.desktop deleted file mode 100644 index ba0c91e..0000000 --- a/src/jdk-devel/jmc-jdk10.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Exec=/usr/lib/jvm/java-10-jdk/bin/jmc -Icon=sun-java-jdk10 -Name=Java 10 Mission Control -StartupNotify=true -Terminal=false -Type=Application -Categories=Development;Java; diff --git a/src/jdk-devel/jmc.desktop b/src/jdk-devel/jmc.desktop new file mode 100644 index 0000000..25e4573 --- /dev/null +++ b/src/jdk-devel/jmc.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=/usr/lib/jvm/java--jdk/bin/jmc +Icon=sun-java-jdk +Name=Java Mission Control +StartupNotify=true +Terminal=false +Type=Application +Categories=Development;Java; diff --git a/src/jdk-devel/jvisualvm-jdk10.desktop b/src/jdk-devel/jvisualvm-jdk10.desktop deleted file mode 100644 index bdd086d..0000000 --- a/src/jdk-devel/jvisualvm-jdk10.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Exec=/usr/lib/jvm/java-10-jdk/bin/jvisualvm -GenericName=Java 10 Monitoring and Performance Monitoring Tool -Icon=sun-java-jdk10 -Name=Java 10 VisualVM -StartupNotify=true -Terminal=false -Type=Application -Categories=Development;Java; diff --git a/src/jdk-devel/policytool-jdk10.desktop b/src/jdk-devel/policytool-jdk10.desktop deleted file mode 100644 index d1ba8ca..0000000 --- a/src/jdk-devel/policytool-jdk10.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Exec=/usr/lib/jvm/java-10-jdk/bin/policytool -Icon=sun-java-jdk10 -Name=Java 10 Policy Settings -StartupNotify=true -Terminal=false -Type=Application -Categories=Settings;Java; diff --git a/src/jdk-devel/policytool.desktop b/src/jdk-devel/policytool.desktop new file mode 100644 index 0000000..a1f5170 --- /dev/null +++ b/src/jdk-devel/policytool.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=/usr/lib/jvm/java--jdk/bin/policytool +Icon=sun-java-jdk +Name=Java Policy Settings +StartupNotify=true +Terminal=false +Type=Application +Categories=Settings;Java; diff --git a/src/jdk/PKGBUILD b/src/jdk/PKGBUILD index f6b5a62..6f00aaf 100644 --- a/src/jdk/PKGBUILD +++ b/src/jdk/PKGBUILD @@ -1,10 +1,11 @@ # Maintainer: Det pkgname=jdk -pkgver=9.0.4 +pkgver=10.0.1 _major=${pkgver/.*} -_build=11 -_hash=c2514751926b4512b076cc82f959763f +_build=10 +_hash=fb4372174a714e6b8c52526dc134031e +_jname=${pkgname}${_major} pkgrel=1 pkgdesc="Oracle Java Development Kit" arch=('x86_64') @@ -16,135 +17,108 @@ optdepends=('alsa-lib: for basic sound support' '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") -conflicts=("java-runtime-jre=$_major" "java-environment-jdk=$_major") - -# Variables -DLAGENTS=('http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u') -_jname=${pkgname}${_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/fontconfig.properties.src" "etc/java-$_jname/logging.properties" "etc/java-$_jname/net.properties" - "etc/java-$_jname/psfont.properties.ja" - "etc/java-$_jname/psfontj2d.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-$_jname.desktop" - "jmc-$_jname.desktop" - "jvisualvm-$_jname.desktop" - "policytool-$_jname.desktop") -sha256sums=('90c4ea877e816e3440862cfa36341bc87d05373d53389ec0f2d54d4e8c95daa2' - '100fd0162a4be04371d9d53121bd511aeb0a230475497a8c19ed0cff20915efc' - 'e4059de8ec0dee1a5eabd1d67a053509aa0009ba6e08739b11140c26f2fcc55a' - '1f74cc627bd6a934681fe2d453058c21794d1435205c501f7fecdaf2c94f5485' - 'ff6684d7d5c26cc805e6f3918284a95b48223db4f37956f35a344373a2931aa4') + "jconsole.desktop" + "jmc.desktop" + "policytool.desktop") +sha256sums=('ae8ed645e6af38432a56a847597ac61d4283b7536688dbab44ab536199d1e5a4' + '3ea717825268a66837380c9ca2b076f02a3298d2df48c3450152fdaf1d0dbc6e' + '365b33b197e6be65ad746e5ed864428e45ae1e24dba53aa7d9c71de0644cf4e2' + '5dfde6ee531056571d9601d47fbb4a3e56062e4d611667a56ba7931ec7948b36') + +DLAGENTS=('http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u') package() { - cd $pkgname-$pkgver + 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 "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 "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 + msg2 "Moving contents..." + mv * "$pkgdir"/$_jvmdir - # Cd to the new playground - cd "$pkgdir"/$_jvmdir + # Cd to the new playground + cd "$pkgdir"/$_jvmdir - # Create a placeholder 'jre' link - ln -s . jre + msg2 "Fixing directory structure..." + # Create a placeholder 'jre' link + ln -s . jre - msg2 "Fixing directory structure..." - # Suffix .desktops + icon (sun-jcontrol.png -> sun-jcontrol-$_jname.png) - for i in $(find lib/desktop/ -type f); do - rename -- "." "-$_jname." $i - done + # Fix bundled .desktops + sed -e "s|Exec=|Exec=$_jvmdir/bin/|" \ + -e "s|.png|-$_jname.png|" \ + -i lib/desktop/applications/* - # Link missing icons - for i in $(find lib/desktop/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 .desktops + icons to /usr/share + mv lib/desktop/* "$pkgdir"/usr/share/ + install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/ - # Fix .desktop's - sed -e '/JavaWS/!s|Name=Java|Name=Java '"$_major"'|' \ - -e "s|Name=JavaWS|Name=JavaWS $_major|" \ - -e "s|Comment=Java|Comment=Java $_major|" \ - -e "s|Exec=|Exec=$_jvmdir/bin/|" \ - -e "s|.png|-$_jname.png|" \ - -i lib/desktop/applications/* + # Suffix .desktops + icon (sun-jcontrol.png -> sun-jcontrol-$_jname.png) + for i in $(find "$pkgdir"/usr/share/ -type f); do + rename -- "." "-$_jname." $i + done - # Move .desktops + icons to /usr/share - mv lib/desktop/* "$pkgdir"/usr/share/ - install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/ + # Write versions to .desktops + .install + sed -i "s//$_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 old_usr_path in $(find conf/ -type f); do - # New location - new_etc_path="/etc/java-$_jname/${old_usr_path/conf\/}" + # 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 /link - install -Dm644 "$old_usr_path" "$pkgdir/$new_etc_path" - ln -sf "$new_etc_path" "$old_usr_path" - 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 confs to /etc and link back to /usr: /usr/lib/jvm/java-$_jname/lib -> /etc - for new_etc_path in ${backup[@]}; do - # Old location - old_usr_path="lib/${new_etc_path#*$_jname/}" + # Move & link + install -Dm644 "$sub_path" "$pkgdir/$new_etc_path" + ln -sf "$new_etc_path" "$sub_path" + done - # Move/link - if [[ -f $old_usr_path ]]; then - install -Dm644 "$old_usr_path" "$pkgdir/$new_etc_path" - ln -sf "/$new_etc_path" "$old_usr_path" - fi - done + # Link NPAPI plugin + ln -sf $_jvmdir/lib/libnpjp2.so "$pkgdir"/usr/lib/mozilla/plugins/libnpjp2-$_jname.so - # 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 - # 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 - # 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 Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy..." - # # Replace default "strong", but limited, cryptography to get an "unlimited strength" one for - # # things like 256-bit AES. Enabled by default in OpenJDK: - # # - http://suhothayan.blogspot.com/2012/05/how-to-install-java-cryptography.html - # # - http://www.eyrie.org/~eagle/notes/debian/jce-policy.html - # sed -i "s/crypto.policy=limited/crypto.policy=unlimited/" "$pkgdir"/etc/java-$_jname/security/java.security - - 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\";" \ + 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/src/jdk/jconsole-jdk9.desktop b/src/jdk/jconsole.desktop similarity index 64% rename from src/jdk/jconsole-jdk9.desktop rename to src/jdk/jconsole.desktop index 8df3672..310ce80 100644 --- a/src/jdk/jconsole-jdk9.desktop +++ b/src/jdk/jconsole.desktop @@ -1,6 +1,6 @@ [Desktop Entry] -Exec=/usr/lib/jvm/java-9-jdk/bin/jconsole -Icon=sun-java-jdk9 +Exec=/usr/lib/jvm/java--jdk/bin/jconsole +Icon=sun-java-jdk Name=Java Monitoring and Management Console StartupNotify=true Terminal=false diff --git a/src/jdk/jdk.install b/src/jdk/jdk.install index faaf439..701d44a 100644 --- a/src/jdk/jdk.install +++ b/src/jdk/jdk.install @@ -1,4 +1,5 @@ -THIS_JAVA='java-9-jdk' +VERSION='10' +THIS_JAVA='java-${VERSION}-jdk' NAME='JDK' all_off="$(tput sgr0)" @@ -39,7 +40,7 @@ post_install() { 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-jdk9.so). + (/usr/lib/mozilla/plugins/libnpjp2-jdk${VERSION}.so). See: - https://github.com/zealdocs/zeal/issues/802 diff --git a/src/jdk/jmc-jdk9.desktop b/src/jdk/jmc.desktop similarity index 62% rename from src/jdk/jmc-jdk9.desktop rename to src/jdk/jmc.desktop index ceb74b0..9131629 100644 --- a/src/jdk/jmc-jdk9.desktop +++ b/src/jdk/jmc.desktop @@ -1,6 +1,6 @@ [Desktop Entry] -Exec=/usr/lib/jvm/java-9-jdk/bin/jmc -Icon=sun-java-jdk9 +Exec=/usr/lib/jvm/java--jdk/bin/jmc +Icon=sun-java-jdk Name=Java Mission Control StartupNotify=true Terminal=false diff --git a/src/jdk/jvisualvm-jdk9.desktop b/src/jdk/jvisualvm-jdk9.desktop deleted file mode 100644 index 745ab80..0000000 --- a/src/jdk/jvisualvm-jdk9.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Exec=/usr/lib/jvm/java-9-jdk/bin/jvisualvm -GenericName=Java Monitoring and Performance Monitoring Tool -Icon=sun-java-jdk9 -Name=Java VisualVM -StartupNotify=true -Terminal=false -Type=Application -Categories=Development;Java; diff --git a/src/jdk/policytool-jdk9.desktop b/src/jdk/policytool.desktop similarity index 60% rename from src/jdk/policytool-jdk9.desktop rename to src/jdk/policytool.desktop index 61e57cf..355280c 100644 --- a/src/jdk/policytool-jdk9.desktop +++ b/src/jdk/policytool.desktop @@ -1,6 +1,6 @@ [Desktop Entry] -Exec=/usr/lib/jvm/java-9-jdk/bin/policytool -Icon=sun-java-jdk9 +Exec=/usr/lib/jvm/java--jdk/bin/policytool +Icon=sun-java-jdk Name=Java Policy Settings StartupNotify=true Terminal=false