2014-06-22 09:20:29 +02:00
|
|
|
# Template file for 'oracle-jre'
|
|
|
|
pkgname=oracle-jre
|
2015-01-21 11:27:26 +01:00
|
|
|
version=8u31
|
|
|
|
_longVersion=1.8.0_31
|
|
|
|
_build=13
|
2014-10-15 13:47:32 +02:00
|
|
|
revision=1
|
2014-06-22 09:20:29 +02:00
|
|
|
short_desc="Java Runtime Environment (JRE)"
|
|
|
|
maintainer="Enno Boland <eb@s01.de>"
|
|
|
|
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
|
|
|
license="oracle"
|
|
|
|
lib32disabled=yes
|
2014-11-01 13:10:22 +01:00
|
|
|
repository="nonfree"
|
2014-06-22 09:20:29 +02:00
|
|
|
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"
|
|
|
|
replaces="java-runtime>=0"
|
|
|
|
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
x86_64)
|
2014-06-22 12:28:32 +02:00
|
|
|
_arch=amd64
|
2014-06-22 09:20:29 +02:00
|
|
|
_filename=jre-${version}-linux-x64.tar.gz
|
2015-01-21 11:27:26 +01:00
|
|
|
checksum="236903524103db776f604aed1f07bca7907876218e803da7688b8e46f8155b24"
|
2014-06-22 09:20:29 +02:00
|
|
|
;;
|
|
|
|
i686)
|
2014-06-22 12:28:32 +02:00
|
|
|
_arch=i386
|
2014-06-22 09:20:29 +02:00
|
|
|
_filename=jre-${version}-linux-i586.tar.gz
|
2015-01-21 11:27:26 +01:00
|
|
|
checksum="251358ce535d3a50f47f90a1dc690cb12dd5e9f960757503eaefcd5504732dfd"
|
2014-06-22 09:20:29 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-07-16 18:08:36 +02:00
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
|
2014-06-22 09:20:29 +02:00
|
|
|
wrksrc="jre$_longVersion"
|
|
|
|
|
|
|
|
do_fetch() {
|
2014-10-15 13:47:32 +02:00
|
|
|
mkdir -p $wrksrc
|
|
|
|
cd $wrksrc
|
2014-06-22 09:20:29 +02:00
|
|
|
wget \
|
2014-10-15 13:47:32 +02:00
|
|
|
--no-check-certificate \
|
2014-06-22 09:20:29 +02:00
|
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
|
|
--progress=bar:force \
|
2014-10-15 13:47:32 +02:00
|
|
|
-c -O $_filename \
|
2014-06-22 09:20:29 +02:00
|
|
|
$distfiles
|
2014-10-15 13:47:32 +02:00
|
|
|
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
do_extract() {
|
|
|
|
tar xf $_filename -C ..
|
2014-06-22 09:20:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
sed \
|
|
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
2014-09-01 23:31:20 +02:00
|
|
|
${FILESDIR}/oracle-jre.sh.in > 11_oracle-jre.sh
|
2014-06-22 09:20:29 +02:00
|
|
|
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
|
|
|
|
sed \
|
2014-09-01 23:16:39 +02:00
|
|
|
-e "s|^Exec=|Exec=/usr/lib/jvm/jre${_longVersion}/bin/policytool|" \
|
2014-06-22 09:20:29 +02:00
|
|
|
${FILESDIR}/java-policy-settings.desktop.in > java-policy-settings.desktop
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
2014-09-01 23:16:39 +02:00
|
|
|
vinstall oracle-jre-vars.sh 644 "usr/lib/jvm/"
|
2014-06-22 09:20:29 +02:00
|
|
|
|
|
|
|
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
|
|
|
|
vinstall java-policy-settings.desktop 644 usr/share/applications
|
2014-09-02 01:04:02 +02:00
|
|
|
ln -s jre${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jre
|
2014-06-22 09:20:29 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-06-22 12:28:32 +02:00
|
|
|
vmkdir "usr/lib/mozilla/plugins"
|
2014-09-01 23:16:39 +02:00
|
|
|
ln -srf ${DESTDIR}/usr/lib/jvm/jre${_longVersion}/lib/${_arch}/libnpjp2.so \
|
2014-06-22 12:28:32 +02:00
|
|
|
${DESTDIR}/usr/lib/mozilla/plugins
|
|
|
|
|
2014-06-22 09:20:29 +02:00
|
|
|
vmkdir "etc/profile.d"
|
2014-09-01 23:33:13 +02:00
|
|
|
vinstall 11_oracle-jre.sh 644 "etc/profile.d"
|
2014-06-22 09:20:29 +02:00
|
|
|
}
|