2014-06-22 07:51:26 +02:00
|
|
|
# Template file for 'oracle-jdk'
|
|
|
|
pkgname=oracle-jdk
|
2014-07-16 21:12:49 +02:00
|
|
|
version=8u11
|
|
|
|
_longVersion=1.8.0_11
|
2014-07-16 21:04:16 +02:00
|
|
|
revision=1
|
2014-07-16 21:12:49 +02:00
|
|
|
_build=12
|
2014-07-16 21:04:16 +02:00
|
|
|
|
2014-06-22 07:51:26 +02:00
|
|
|
short_desc="Java Development Kit (JDK)"
|
|
|
|
maintainer="Enno Boland <eb@s01.de>"
|
|
|
|
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
|
|
|
license="oracle"
|
|
|
|
lib32disabled=yes
|
|
|
|
nonfree=yes
|
2014-07-17 08:37:35 +02:00
|
|
|
only_for_archs="i686 x86_64"
|
2014-06-22 07:51:26 +02:00
|
|
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
|
|
|
hostmakedepends="wget"
|
2014-06-22 09:01:35 +02:00
|
|
|
provides="java-runtime-${version}_1 oracle-jre-${version}_${revision}"
|
|
|
|
conflicts="oracle-jre>=0"
|
|
|
|
replaces="java-runtime>=0 oracle-jre>=0"
|
2014-06-22 07:51:26 +02:00
|
|
|
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
x86_64)
|
2014-06-22 12:24:51 +02:00
|
|
|
_arch=amd64
|
2014-06-22 07:51:26 +02:00
|
|
|
_filename=jdk-${version}-linux-x64.tar.gz
|
2014-07-16 21:04:16 +02:00
|
|
|
checksum="f3593b248b64cc53bf191f45b92a1f10e8c5099c2f84bd5bd5d6465dfd07a8e9"
|
2014-06-22 07:51:26 +02:00
|
|
|
;;
|
|
|
|
i686)
|
2014-06-22 12:24:51 +02:00
|
|
|
_arch=i386
|
2014-06-22 07:51:26 +02:00
|
|
|
_filename=jdk-${version}-linux-i586.tar.gz
|
2014-07-16 21:04:16 +02:00
|
|
|
checksum="3981e6fb7d35b20ac3c05ec56fb3798ac1cd872a9e968bb3d77a718af7b146d1"
|
2014-06-22 07:51:26 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-07-16 21:04:16 +02:00
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
|
2014-06-22 07:51:26 +02:00
|
|
|
wrksrc="jdk$_longVersion"
|
|
|
|
|
|
|
|
do_fetch() {
|
2014-07-16 21:04:16 +02:00
|
|
|
mkdir -p $wrksrc
|
|
|
|
cd $wrksrc
|
2014-06-22 07:51:26 +02:00
|
|
|
wget \
|
|
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
|
|
--progress=bar:force \
|
2014-07-16 21:04:16 +02:00
|
|
|
-c -O $_filename \
|
2014-06-22 07:51:26 +02:00
|
|
|
$distfiles
|
2014-07-16 21:04:16 +02:00
|
|
|
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
do_extract() {
|
|
|
|
tar xf $_filename -C ..
|
2014-06-22 07:51:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
sed \
|
|
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
|
|
|
${FILESDIR}/oracle-jdk.sh.in > oracle-jdk.sh
|
|
|
|
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
|
|
|
|
sed \
|
|
|
|
-e "s|^Exec=|Exec=/usr/share/java/$pkgname/bin/policytool|" \
|
|
|
|
${FILESDIR}/java-policy-settings.desktop.in > java-policy-settings.desktop
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
2014-06-22 09:01:35 +02:00
|
|
|
vmkdir "usr/share/java/$pkgname/jre"
|
2014-06-22 07:51:26 +02:00
|
|
|
vinstall oracle-jdk-vars.sh 644 "usr/share/java"
|
|
|
|
|
2014-07-16 18:05:42 +02:00
|
|
|
vlicense LICENSE
|
2014-06-22 07:51:26 +02:00
|
|
|
vinstall java-policy-settings.desktop 644 usr/share/applications
|
|
|
|
|
2014-06-22 09:01:35 +02:00
|
|
|
ln -sr $DESTDIR/usr/share/java/$pkgname/jre $DESTDIR/usr/share/java/oracle-jre
|
|
|
|
|
2014-06-22 07:51:26 +02:00
|
|
|
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
|
|
|
|
|
2014-06-22 12:24:51 +02:00
|
|
|
vmkdir "usr/lib/mozilla/plugins"
|
|
|
|
ln -srf ${DESTDIR}/usr/share/java/oracle-jre/lib/${_arch}/libnpjp2.so \
|
|
|
|
${DESTDIR}/usr/lib/mozilla/plugins
|
|
|
|
|
|
|
|
|
2014-06-22 07:51:26 +02:00
|
|
|
vmkdir "etc/profile.d"
|
|
|
|
vinstall oracle-jdk.sh 644 "etc/profile.d"
|
|
|
|
}
|