93 lines
3.0 KiB
Bash
93 lines
3.0 KiB
Bash
# Template file for 'oracle-jre'
|
|
pkgname=oracle-jre
|
|
version=8u131
|
|
revision=1
|
|
|
|
_longVersion=1.${version%u*}.0_${version#*u}
|
|
_build=11
|
|
_tag=d54c1d3a095b4ff2b6607d096fa80163
|
|
|
|
short_desc="Java Runtime Environment (JRE)"
|
|
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"
|
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
|
hostmakedepends="wget"
|
|
provides="java-runtime-${version}_1"
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
x86_64)
|
|
_arch=amd64
|
|
_filename=jre-${version}-linux-x64.tar.gz
|
|
checksum="355e5cdb066d4cada1f9f16f358b6fa6280ff5caf7470cf0d5cdd43083408d35"
|
|
;;
|
|
i686)
|
|
_arch=i386
|
|
_filename=jre-${version}-linux-i586.tar.gz
|
|
checksum="a773f2fe17061ef637ed2094b06313a99c0b45ba3d3cb7f8f1ebf18448495aeb"
|
|
;;
|
|
esac
|
|
|
|
alternatives="
|
|
java:/usr/bin/java:/usr/lib/jvm/jre${_longVersion}/bin/java
|
|
java:/usr/bin/javaws:/usr/lib/jvm/jre${_longVersion}/bin/javaws
|
|
java:/usr/bin/jcontrol:/usr/lib/jvm/jre${_longVersion}/bin/jcontrol
|
|
java:/usr/bin/jjs:/usr/lib/jvm/jre${_longVersion}/bin/jjs
|
|
java:/usr/bin/keytool:/usr/lib/jvm/jre${_longVersion}/bin/keytool
|
|
java:/usr/bin/orbd:/usr/lib/jvm/jre${_longVersion}/bin/orbd
|
|
java:/usr/bin/pack200:/usr/lib/jvm/jre${_longVersion}/bin/pack200
|
|
java:/usr/bin/policytool:/usr/lib/jvm/jre${_longVersion}/bin/policytool
|
|
java:/usr/bin/rmid:/usr/lib/jvm/jre${_longVersion}/bin/rmid
|
|
java:/usr/bin/rmiregistry:/usr/lib/jvm/jre${_longVersion}/bin/rmiregistry
|
|
java:/usr/bin/servertool:/usr/lib/jvm/jre${_longVersion}/bin/servertool
|
|
java:/usr/bin/tnameserv:/usr/lib/jvm/jre${_longVersion}/bin/tnameserv
|
|
java:/usr/bin/unpack200:/usr/lib/jvm/jre${_longVersion}/bin/unpack200
|
|
|
|
java-plugin:/usr/lib/mozilla/plugins/libnpjp2.so:/usr/lib/jvm/jre${_longVersion}/lib/$_arch/libnpjp2.so
|
|
"
|
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/$_tag/${_filename}"
|
|
wrksrc="jre$_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_JRE_URL%|${distfiles}|" \
|
|
-e "s|%ORACLE_JRE_CHECKSUM%|${checksum}|" \
|
|
${FILESDIR}/oracle-jre-vars.sh.in > oracle-jre-vars.sh
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
|
vinstall oracle-jre-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 jre${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jre
|
|
|
|
for i in 16 20 22 24 32 40 48 64 72 96 128 256 512; do
|
|
vinstall $FILESDIR/oracle-jre-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
|
|
done
|
|
|
|
vinstall $FILESDIR/oracle-jre.sh 644 "etc/profile.d" 10_oracle-jre.sh
|
|
}
|