2014-06-22 09:20:29 +02:00
|
|
|
# Template file for 'oracle-jre'
|
|
|
|
pkgname=oracle-jre
|
2014-07-16 18:08:36 +02:00
|
|
|
version=8u11
|
|
|
|
_longVersion=1.8.0_11
|
|
|
|
_build=12
|
|
|
|
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
|
|
|
|
nonfree=yes
|
|
|
|
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"
|
2014-06-22 10:06:01 +02:00
|
|
|
conflicts="oracle-jdk>=0"
|
2014-06-22 09:20:29 +02:00
|
|
|
|
|
|
|
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
|
2014-07-16 18:08:36 +02:00
|
|
|
checksum="17d0d015c3bd7e535490c6ce869655b6ac4024ba3dc39dc9ed743de4376750a4"
|
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
|
2014-07-16 18:08:36 +02:00
|
|
|
checksum="b1348b4842cc23862ea9ef69f71674f49fc1197caec0a8d82502009568762442"
|
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() {
|
|
|
|
local path="${XBPS_SRCDISTDIR}/${pkgname}-${version}/$_filename"
|
|
|
|
mkdir -p "${XBPS_SRCDISTDIR}/${pkgname}-${version}" "${XBPS_BUILDDIR}/${pkgname}-${version}"
|
|
|
|
wget \
|
|
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
|
|
--progress=bar:force \
|
|
|
|
-c -O $path \
|
|
|
|
$distfiles
|
|
|
|
mkdir -p $wrksrc
|
|
|
|
echo "$checksum $path" | sha256sum -c
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
sed \
|
|
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
|
|
|
${FILESDIR}/oracle-jre.sh.in > oracle-jre.sh
|
|
|
|
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 \
|
|
|
|
-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}"
|
|
|
|
vinstall oracle-jre-vars.sh 644 "usr/share/java"
|
|
|
|
|
|
|
|
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
|
|
|
|
vinstall java-policy-settings.desktop 644 usr/share/applications
|
|
|
|
|
|
|
|
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"
|
|
|
|
ln -srf ${DESTDIR}/usr/share/java/oracle-jre/lib/${_arch}/libnpjp2.so \
|
|
|
|
${DESTDIR}/usr/lib/mozilla/plugins
|
|
|
|
|
2014-06-22 09:20:29 +02:00
|
|
|
vmkdir "etc/profile.d"
|
|
|
|
vinstall oracle-jre.sh 644 "etc/profile.d"
|
|
|
|
}
|