New package: oracle-jdk-8u5

This commit is contained in:
Enno Boland 2014-06-22 07:51:26 +02:00
parent 731680dd40
commit eb7d853b06
19 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,42 @@
#
# 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"
case "${ACTION}" in
post)
. usr/share/java/oracle-jdk-vars.sh
mkdir -p "$BUILD_DIR"
wget \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
--progress=bar:force \
-c -O $BUILD_DIR/jdk.tar.gz \
$ORACLE_JDK_URL
echo "$ORACLE_JDK_CHECKSUM $BUILD_DIR/jdk.tar.gz" | sha256sum -c || exit 1
tar xf ${BUILD_DIR}/jdk.tar.gz || exit 1
rm -rf /usr/java/$PKGNAME 2> /dev/null
mv jdk$ORACLE_JDK_LONG_VERSION /usr/share/java/$PKGNAME || exit 1
rm -r $BUILD_DIR
cat << _EOF
=====================================================================
- The Oracle JDK package is licensed software.
You MUST read and agree to the license stored in
/usr/share/licenses/oracle-jdk/license.html
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-jdk-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_JDK_URL="%ORACLE_JDK_URL%" ORACLE_JDK_CHECKSUM="%ORACLE_JDK_CHECKSUM%" ORACLE_JDK_LONG_VERSION="%LONG_VERSION%"

View File

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

View File

@ -0,0 +1,75 @@
# Template file for 'oracle-jdk'
pkgname=oracle-jdk
version=8u5
_longVersion=1.8.0_05
revision=1
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
only_for_archs="i686 x86_64 armv6l armv7l"
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=jdk-${version}-linux-x64.tar.gz
checksum="44901389e9fb118971534ad0f58558ba8c43f315b369117135bd6617ae631edc"
;;
i686)
_filename=jdk-${version}-linux-i586.tar.gz
checksum="779f83efb8dc9ce7c1143ba9bbd38fa2d8a1c49dcb61f7d36972d37d109c5fc9"
;;
armv*)
_filename=jdk-${version}-linux-arm-vfp-hflt.tar.gz
checksum="54e04ccf8383fb631b0c4a355e9136a05e53690b5caca52ef7581ae67e686179"
;;
esac
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b13/${_filename}"
wrksrc="jdk$_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-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}"
vinstall oracle-jdk-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-jdk-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
done
vmkdir "etc/profile.d"
vinstall oracle-jdk.sh 644 "etc/profile.d"
}