139 lines
5.7 KiB
Bash
139 lines
5.7 KiB
Bash
# Template file for 'oracle-jdk'
|
|
pkgname=oracle-jdk
|
|
version=8u77
|
|
revision=1
|
|
|
|
_build=03
|
|
_longVersion=1.${version%u*}.0_${version#*u}
|
|
|
|
short_desc="Java Development Kit (JDK)"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
|
license="oracle"
|
|
lib32disabled=yes
|
|
repository="nonfree"
|
|
only_for_archs="i686 x86_64 armv6l armv7l aarch64"
|
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
|
hostmakedepends="wget"
|
|
provides="java-environment-${version}_1"
|
|
replaces="java-environment>=0"
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
x86_64)
|
|
_arch=amd64
|
|
_filename=jdk-${version}-linux-x64.tar.gz
|
|
checksum="a47dc0962a57b27a0cc00b9f11a53dc3add40c98633ba49a2419b845e4dedf43"
|
|
;;
|
|
i686)
|
|
_arch=i386
|
|
_filename=jdk-${version}-linux-i586.tar.gz
|
|
checksum="f2889b778538fe3d20b2d37d0de3c3204de86126aadb75c1bb38d11255b41e92"
|
|
;;
|
|
arm*)
|
|
_arch=arm
|
|
_filename=jdk-${version}-linux-arm32-vfp-hflt.tar.gz
|
|
checksum="c3af7a080cd74f7350680a020749b8161f78f66d1f16cda91bf758c3e58b524b"
|
|
;;
|
|
aarch64)
|
|
_arch=aarch64
|
|
_filename=jdk-${version}-linux-arm64-vfp-hflt.tar.gz
|
|
checksum="d194595d0c6d2f0b6fad36da489e26a65e3825af85c051ce3c84d5a1f5a96b31"
|
|
;;
|
|
esac
|
|
|
|
alternatives="
|
|
java:/usr/bin/java:/usr/lib/jvm/jdk${_longVersion}/bin/java
|
|
java:/usr/bin/javaws:/usr/lib/jvm/jdk${_longVersion}/bin/javaws
|
|
java:/usr/bin/jcontrol:/usr/lib/jvm/jdk${_longVersion}/bin/jcontrol
|
|
java:/usr/bin/jjs:/usr/lib/jvm/jdk${_longVersion}/bin/jjs
|
|
java:/usr/bin/keytool:/usr/lib/jvm/jdk${_longVersion}/bin/keytool
|
|
java:/usr/bin/orbd:/usr/lib/jvm/jdk${_longVersion}/bin/orbd
|
|
java:/usr/bin/pack200:/usr/lib/jvm/jdk${_longVersion}/bin/pack200
|
|
java:/usr/bin/policytool:/usr/lib/jvm/jdk${_longVersion}/bin/policytool
|
|
java:/usr/bin/rmid:/usr/lib/jvm/jdk${_longVersion}/bin/rmid
|
|
java:/usr/bin/rmiregistry:/usr/lib/jvm/jdk${_longVersion}/bin/rmiregistry
|
|
java:/usr/bin/servertool:/usr/lib/jvm/jdk${_longVersion}/bin/servertool
|
|
java:/usr/bin/tnameserv:/usr/lib/jvm/jdk${_longVersion}/bin/tnameserv
|
|
java:/usr/bin/unpack200:/usr/lib/jvm/jdk${_longVersion}/bin/unpack200
|
|
|
|
jdk:/usr/bin/ControlPanel:/usr/lib/jvm/jdk${_longVersion}/bin/ControlPanel
|
|
jdk:/usr/bin/appletviewer:/usr/lib/jvm/jdk${_longVersion}/bin/appletviewer
|
|
jdk:/usr/bin/extcheck:/usr/lib/jvm/jdk${_longVersion}/bin/extcheck
|
|
jdk:/usr/bin/idlj:/usr/lib/jvm/jdk${_longVersion}/bin/idlj
|
|
jdk:/usr/bin/jar:/usr/lib/jvm/jdk${_longVersion}/bin/jar
|
|
jdk:/usr/bin/jarsigner:/usr/lib/jvm/jdk${_longVersion}/bin/jarsigner
|
|
jdk:/usr/bin/java-rmi.cgi:/usr/lib/jvm/jdk${_longVersion}/bin/java-rmi.cgi
|
|
jdk:/usr/bin/javac:/usr/lib/jvm/jdk${_longVersion}/bin/javac
|
|
jdk:/usr/bin/javadoc:/usr/lib/jvm/jdk${_longVersion}/bin/javadoc
|
|
jdk:/usr/bin/javafxpackager:/usr/lib/jvm/jdk${_longVersion}/bin/javafxpackager
|
|
jdk:/usr/bin/javah:/usr/lib/jvm/jdk${_longVersion}/bin/javah
|
|
jdk:/usr/bin/javap:/usr/lib/jvm/jdk${_longVersion}/bin/javap
|
|
jdk:/usr/bin/javapackager:/usr/lib/jvm/jdk${_longVersion}/bin/javapackager
|
|
jdk:/usr/bin/jcmd:/usr/lib/jvm/jdk${_longVersion}/bin/jcmd
|
|
jdk:/usr/bin/jconsole:/usr/lib/jvm/jdk${_longVersion}/bin/jconsole
|
|
jdk:/usr/bin/jdb:/usr/lib/jvm/jdk${_longVersion}/bin/jdb
|
|
jdk:/usr/bin/jdeps:/usr/lib/jvm/jdk${_longVersion}/bin/jdeps
|
|
jdk:/usr/bin/jhat:/usr/lib/jvm/jdk${_longVersion}/bin/jhat
|
|
jdk:/usr/bin/jinfo:/usr/lib/jvm/jdk${_longVersion}/bin/jinfo
|
|
jdk:/usr/bin/jmap:/usr/lib/jvm/jdk${_longVersion}/bin/jmap
|
|
jdk:/usr/bin/jmc:/usr/lib/jvm/jdk${_longVersion}/bin/jmc
|
|
jdk:/usr/bin/jmc.ini:/usr/lib/jvm/jdk${_longVersion}/bin/jmc.ini
|
|
jdk:/usr/bin/jps:/usr/lib/jvm/jdk${_longVersion}/bin/jps
|
|
jdk:/usr/bin/jrunscript:/usr/lib/jvm/jdk${_longVersion}/bin/jrunscript
|
|
jdk:/usr/bin/jsadebugd:/usr/lib/jvm/jdk${_longVersion}/bin/jsadebugd
|
|
jdk:/usr/bin/jstack:/usr/lib/jvm/jdk${_longVersion}/bin/jstack
|
|
jdk:/usr/bin/jstat:/usr/lib/jvm/jdk${_longVersion}/bin/jstat
|
|
jdk:/usr/bin/jstatd:/usr/lib/jvm/jdk${_longVersion}/bin/jstatd
|
|
jdk:/usr/bin/jvisualvm:/usr/lib/jvm/jdk${_longVersion}/bin/jvisualvm
|
|
jdk:/usr/bin/native2ascii:/usr/lib/jvm/jdk${_longVersion}/bin/native2ascii
|
|
jdk:/usr/bin/rmic:/usr/lib/jvm/jdk${_longVersion}/bin/rmic
|
|
jdk:/usr/bin/schemagen:/usr/lib/jvm/jdk${_longVersion}/bin/schemagen
|
|
jdk:/usr/bin/serialver:/usr/lib/jvm/jdk${_longVersion}/bin/serialver
|
|
jdk:/usr/bin/wsgen:/usr/lib/jvm/jdk${_longVersion}/bin/wsgen
|
|
jdk:/usr/bin/wsimport:/usr/lib/jvm/jdk${_longVersion}/bin/wsimport
|
|
jdk:/usr/bin/xjc:/usr/lib/jvm/jdk${_longVersion}/bin/xjc
|
|
|
|
java-plugin:/usr/lib/mozilla/plugins/libnpjp2.so:/usr/lib/jvm/jdk${_longVersion}/jre/lib/$_arch/libnpjp2.so
|
|
"
|
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
|
|
wrksrc="jdk$_longVersion"
|
|
|
|
do_fetch() {
|
|
mkdir -p $wrksrc
|
|
cd $wrksrc
|
|
wget \
|
|
--no-check-certificate \
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
--progress=bar:force \
|
|
-c -O $_filename \
|
|
$distfiles
|
|
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
|
|
}
|
|
|
|
do_extract() {
|
|
tar xf $_filename -C ..
|
|
}
|
|
|
|
do_build() {
|
|
sed \
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
|
-e "s|%ORACLE_JDK_URL%|${distfiles}|" \
|
|
-e "s|%ORACLE_JDK_CHECKSUM%|${checksum}|" \
|
|
${FILESDIR}/oracle-jdk-vars.sh.in > oracle-jdk-vars.sh
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
|
vinstall oracle-jdk-vars.sh 644 "usr/lib/jvm/"
|
|
|
|
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
|
|
vinstall $FILESDIR/java-policy-settings.desktop 644 usr/share/applications
|
|
ln -s jdk${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jdk
|
|
|
|
for i in 16 20 22 24 32 40 48 64 72 96 128 256 512; do
|
|
vinstall $FILESDIR/oracle-jdk-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
|
|
done
|
|
|
|
vinstall $FILESDIR/oracle-jdk.sh 644 "etc/profile.d" 11_oracle-jdk.sh
|
|
}
|