summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2020-05-22 17:10:40 -0400
committerChris Severance2020-05-22 17:10:40 -0400
commit3030e0e8c8da4d528ad939f0929d6f43238edffd (patch)
treeade3d68d4776c4ec2510be74e162449048601bbb
parente97fb5595e869fcdb620c09b0e84d24dea97bdfb (diff)
downloadaur-jdk10.tar.gz
autu: Update to 10.0.2-1
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD235
-rwxr-xr-xreadme.sh15
3 files changed, 174 insertions, 98 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4670b6afd99..2d27189ee5b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,33 +1,30 @@
-# Generated by mksrcinfo v8
-# Wed Jan 2 15:43:51 UTC 2019
pkgbase = jdk10
pkgdesc = Oracle Java 10 Development Kit (public release - end of support)
pkgver = 10.0.2
pkgrel = 1
- url = http://www.oracle.com/technetwork/java/javase/downloads/index.html
+ url = https://www.oracle.com/java/technologies/java-archive-javase10-downloads.html
install = jdk10.install
arch = x86_64
license = custom:Oracle
+ makedepends = awk
depends = ca-certificates-java
depends = hicolor-icon-theme
- depends = java-environment-common
depends = java-runtime-common
depends = nss
depends = xdg-utils
+ depends = java-environment-common
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
+ provides = java-environment-jdk=10
+ provides = java-environment=10
options = !strip
backup = etc/java-jdk10/management/jmxremote.access
backup = etc/java-jdk10/management/management.properties
@@ -37,18 +34,21 @@ pkgbase = jdk10
backup = etc/java-jdk10/logging.properties
backup = etc/java-jdk10/net.properties
backup = etc/java-jdk10/sound.properties
- source = file://jdk-10.0.2_linux-x64_bin.tar.gz
source = jconsole.desktop
+ source = manual://jdk-10.0.2_linux-x64_bin.tar.gz
source = jmc.desktop
source = policytool.desktop
- md5sums = 1cc0fa1d7f059978ae22a688dabcdc0b
+ source = readme.sh
md5sums = ed1e8801db16b149247819c68fda97b1
+ md5sums = 1cc0fa1d7f059978ae22a688dabcdc0b
md5sums = 0a3c4277ac6aec5c633af98d54986fa9
md5sums = da29ac8f2d6b813ada985f6ee898005e
- sha256sums = 6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b
+ md5sums = 51c8839211cc53f09c9b11a8e28ed1ef
sha256sums = 7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034
+ sha256sums = 6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b
sha256sums = bef07cdacef3e25137ac6ec394f09bb683c3ceb30b894f4b0c5ea40b0f87e4d5
sha256sums = 79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1
+ sha256sums = f1081b08cfbb467277e95b3794191c9963398579733fa8832425b308b5917711
pkgname = jdk10
diff --git a/PKGBUILD b/PKGBUILD
index 293c9203cef..455a74963db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,133 +1,194 @@
# Maintainer: Chris Severance aur.severach AatT spamgourmet.com
# Contributor: 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 $_major Development Kit (public release - end of support)"
+set -u
+_pkgname='jdk'
+_major='10'
+pkgname="${_pkgname}${_major}"
+_minor='0.2'; _build='13'; _hash='19aef61b38124481863b1413dce1855f'
+pkgver="${_major}.${_minor}"
+pkgrel='1'
+pkgdesc="Oracle Java ${_major} Development Kit"
+pkgdesc+=' (public release - end of support)'
arch=('x86_64')
-url="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
+url='https://www.oracle.com/java/technologies/java-archive-javase10-downloads.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")
+depends=('ca-certificates-java' 'hicolor-icon-theme' 'java-runtime-common' 'nss' 'xdg-utils')
+depends+=('java-environment-common')
+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)'
+)
+makedepends=('awk')
+provides=(
+ "java-runtime=${_major}"
+ "java-runtime-headless=${_major}"
+ "java-web-start=${_major}"
+ "java-runtime-jre=${_major}"
+ "java-runtime-headless-jre=${_major}"
+ "java-web-start-jre=${_major}"
+ "java-openjfx=${_major}"
+ "java-environment-jdk=${_major}"
+ "java-environment=${_major}"
+)
+
+# Variables
+
+_jname="${_pkgname}${_major}"
+_jvmdir="/usr/lib/jvm/java-${_major}-${_pkgname}"
+
+#provides+=("${_jname}")
+#conflicts=("${_jname}")
+
+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
+install="${pkgname}.install"
+_srcfil="${_pkgname}-${pkgver}_linux-x64_bin.tar.gz"
source=(
- #"http://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/${_pkgname}-${pkgver}_linux-x64_bin.tar.gz"
- "file://${_pkgname}-${pkgver}_linux-x64_bin.tar.gz"
'jconsole.desktop'
+ "https://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/${_srcfil}"
'jmc.desktop'
'policytool.desktop'
+ 'readme.sh'
)
-md5sums=('1cc0fa1d7f059978ae22a688dabcdc0b'
- 'ed1e8801db16b149247819c68fda97b1'
+# from oracle-sqldeveloper
+DLAGENTS+=("manual::${startdir:-}/readme.sh %o %u")
+source[1]="manual://${_srcfil}"
+if [ ! -z "${HOME:-}" ]; then # block mksrcinfo
+ XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD 2>/dev/null)" || :
+ if [ -z "${XDG_DOWNLOAD_DIR}" ]; then
+ XDG_DOWNLOAD_DIR=~/'Downloads'
+ fi
+ if [ -s "${XDG_DOWNLOAD_DIR}/${_srcfil}" ] && [ ! -e "${_srcfil}" ]; then
+ if type msg > /dev/null 2>&1; then
+ set +u
+ msg "Scooping files from ${XDG_DOWNLOAD_DIR}" 1>&2
+ msg2 "${_srcfil}" 1>&2
+ set -u
+ ln -sr "${XDG_DOWNLOAD_DIR}/${_srcfil}"
+ fi
+ fi
+fi
+unset _srcfil
+unset XDG_DOWNLOAD_DIR
+
+md5sums=('ed1e8801db16b149247819c68fda97b1'
+ '1cc0fa1d7f059978ae22a688dabcdc0b'
'0a3c4277ac6aec5c633af98d54986fa9'
- 'da29ac8f2d6b813ada985f6ee898005e')
-sha256sums=('6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b'
- '7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034'
+ 'da29ac8f2d6b813ada985f6ee898005e'
+ '51c8839211cc53f09c9b11a8e28ed1ef')
+sha256sums=('7fd81eced792aa76dac697b3daaa5d2699b15e8c6768ed4690a331e9f616b034'
+ '6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b'
'bef07cdacef3e25137ac6ec394f09bb683c3ceb30b894f4b0c5ea40b0f87e4d5'
- '79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1')
-
-#DLAGENTS=('http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u')
+ '79fdffd1c3d6c0826a95d21e59392213c3a2e32709909629cfb4d222d349f2e1'
+ 'f1081b08cfbb467277e95b3794191c9963398579733fa8832425b308b5917711')
+
+PKGEXT='.pkg.tar.gz' # much faster than .xz
+## Alternative mirror, if your local one is throttled:
+## Posting new sites does no good. They get taken down by the admin
+## from too much traffic or complaints from Oracle.
+#source[1]=???
+
+DLAGENTS=("${DLAGENTS[@]// -gqb \"\"/ -gq}")
+DLAGENTS=("${DLAGENTS[@]//curl -/curl -b 'oraclelicense=a' -}")
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
+ set -u
+ cd "${_pkgname}-${pkgver}"
+
+ set +u; msg2 'Creating directory structure...'; set -u
+ 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}"
+
+ set +u; msg2 'Removing redundancies...'; set -u
+ 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
+ set +u; msg2 'Moving contents...'; set -u
+ mv * "${pkgdir}/${_jvmdir}"
# Cd to the new playground
- cd "$pkgdir"/$_jvmdir
+ cd "${pkgdir}/${_jvmdir}"
- msg2 "Fixing directory structure..."
+ set +u; msg2 'Fixing directory structure...'; set -u
# Create a placeholder 'jre' link
- ln -s . jre
+ ln -s . 'jre'
- # Fix bundled .desktops
- sed -e "s|Exec=|Exec=$_jvmdir/bin/|" \
- -e "s|.png|-$_jname.png|" \
- -i lib/desktop/applications/*
+ # Fix .desktop paths
+ 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/
+ mv 'lib/desktop'/* "${pkgdir}/usr/share/"
+ install -m644 "${srcdir}"/*.desktop -t "${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
+ # Suffix .desktops + icons (sun-jcontrol.png -> sun-jcontrol-${_jname}.png)
+ local _i
+ 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
+ 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}"
+ 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
+ # Move confs to /etc and link back to /usr: /usr/lib/jvm/java-${_jname}/conf -> /etc
+ local _sub_path
+ local _new_etc_path
+ for _sub_path in $(find conf/ -type f); do
# New location
- new_etc_path="/etc/java-$_jname/${sub_path/conf\/}"
+ _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"
+ # Move
+ 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
+ ln -s "${_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
+ 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 -s "/usr/share/licenses/java${_major}-${_pkgname}/" "${pkgdir}/usr/share/licenses/${pkgname}"
- msg2 "Enabling copy+paste in unsigned applets..."
+ set +u; msg2 'Enabling copy+paste in unsigned applets...'; set -u
# 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
+ local _text='\
+ // (AUR) Allow unsigned applets to read system clipboard, see:
+ // - https://blogs.oracle.com/kyle/entry/copy_and_paste_in_java
+ // - http://slightlyrandombrokenthoughts.blogspot.com/2011/03/oracle-java-applet-clipboard-injection.html
+ permission java.awt.AWTPermission "accessClipboard";'
+ local _lf=$'\n'
+ _text="${_text//${_lf}/\\n}"
+ local _line
+ _line="$(awk '/permission/{a=NR}; END{print a}' "${pkgdir}/etc/java-${_jname}/security/java.policy")"
+ sed -e "${_line} a ${_text}" -i "${pkgdir}/etc/java-${_jname}/security/java.policy"
+ set +u
}
+set +u
diff --git a/readme.sh b/readme.sh
new file mode 100755
index 00000000000..61f35b6bb52
--- /dev/null
+++ b/readme.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/bash
+
+echo 'The source file for this package needs to be downloaded manually'
+echo 'since it requires a login and is not redistributable.'
+echo 'Please visit'
+echo ' https://www.oracle.com/technetwork/java/javase/downloads/'
+echo ' Java SE ... JDK, Download v'
+echo 'and download'
+echo " ${1%.part}"
+echo 'to your Downloads folder (XDG_DOWNLOAD_DIR) or in with the PKGBUILD.'
+echo ''
+echo 'Please do not post alternate sources. They are not legal. Advertising'
+echo 'will get them taken down by Oracle or too much traffic. Keep it a'
+echo 'secret.'
+exit 1