New package: oracle-jre-8u5

This commit is contained in:
Enno Boland 2014-06-22 09:20:29 +02:00
parent fb06c6d997
commit ebd549050a
19 changed files with 140 additions and 0 deletions

View File

@ -0,0 +1,50 @@
#
# This script will install the actual plugin, advise the user to read the
# license for Chrome and to re-login to have environment variables set
# properly.
#
BUILD_DIR="./var/tmp/${PKGNAME}.build"
do_install() {
mkdir -p "$BUILD_DIR"
wget \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
--progress=bar:force \
-c -O $BUILD_DIR/jre.tar.gz \
$ORACLE_JRE_URL
echo "$ORACLE_JRE_CHECKSUM $BUILD_DIR/jre.tar.gz" | sha256sum -c || return 1
tar xf ${BUILD_DIR}/jre.tar.gz || return 1
if [ -d usr/share/java/$PKGNAME ]; then
rm -rf usr/share/java/$PKGNAME
fi
mv jre$ORACLE_JRE_LONG_VERSION usr/share/java/$PKGNAME || return 1
}
case "${ACTION}" in
post)
. usr/share/java/oracle-jre-vars.sh
do_install
RESULT=$?
rm -r $BUILD_DIR
[ $RESULT -ne 0 ] && exit $RESULT
cat << _EOF
=====================================================================
- The Oracle JRE package is licensed software.
You MUST read and agree to the license stored in
/usr/share/licenses/oracle-jre/LICENSE
before using it.
- Please re-login to update PATH and JAVA_HOME or re-source
/etc/profile:
$ source /etc/profile
=====================================================================
_EOF
;;
esac

View File

@ -0,0 +1,6 @@
case "$ACTION" in
pre)
. usr/share/java/oracle-jre-vars.sh
rm -r usr/lib/java/$PKGNAME
;;
esac

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Exec=
Icon=oracle-java.png
Name[cs]=Nastavení politiky Java aplikací
Name=Java Policy Settings
Path=
StartupNotify=true
Terminal=false
Type=Application
Categories=Settings;Java;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1 @@
export ORACLE_JRE_URL="%ORACLE_JRE_URL%" ORACLE_JRE_CHECKSUM="%ORACLE_JRE_CHECKSUM%" ORACLE_JRE_LONG_VERSION="%LONG_VERSION%"

View File

@ -0,0 +1,2 @@
export JAVA_HOME=${JAVA_HOME=/usr/share/java/oracle-jre}
export PATH="$PATH:/usr/share/java/oracle-jre/bin"

View File

@ -0,0 +1,71 @@
# Template file for 'oracle-jre'
pkgname=oracle-jre
version=8u5
_longVersion=1.8.0_05
revision=1
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"
case "${XBPS_TARGET_MACHINE}" in
x86_64)
_filename=jre-${version}-linux-x64.tar.gz
checksum="de7ba8e27b9e7352c44608969871dc11dedadd26d81865f9a42aabff8dadba2a"
;;
i686)
_filename=jre-${version}-linux-i586.tar.gz
checksum="77a81e63325af682d52875e6699d5edd5f3be668025bcc99f5d9132c46b82053"
;;
esac
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b13/${_filename}"
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
vmkdir "etc/profile.d"
vinstall oracle-jre.sh 644 "etc/profile.d"
}