2014-06-22 05:51:26 +00:00
|
|
|
# Template file for 'oracle-jdk'
|
|
|
|
pkgname=oracle-jdk
|
2014-10-15 11:47:19 +00:00
|
|
|
version=8u25
|
|
|
|
_longVersion=1.8.0_25
|
2014-11-05 11:23:15 +00:00
|
|
|
revision=3
|
2014-10-15 11:47:19 +00:00
|
|
|
_build=17
|
2014-07-16 19:04:16 +00:00
|
|
|
|
2014-06-22 05:51:26 +00:00
|
|
|
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
|
2014-11-01 12:10:22 +00:00
|
|
|
repository="nonfree"
|
2014-07-17 06:37:35 +00:00
|
|
|
only_for_archs="i686 x86_64"
|
2014-06-22 05:51:26 +00:00
|
|
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
|
|
|
hostmakedepends="wget"
|
2014-09-01 21:56:57 +00:00
|
|
|
provides="java-environment-${version}_1"
|
|
|
|
replaces="java-environment>=0"
|
2014-11-21 00:43:53 +00:00
|
|
|
update_pattern=">Java SE \K[^<]+(?=<)"
|
2014-06-22 05:51:26 +00:00
|
|
|
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
x86_64)
|
2014-06-22 10:24:51 +00:00
|
|
|
_arch=amd64
|
2014-06-22 05:51:26 +00:00
|
|
|
_filename=jdk-${version}-linux-x64.tar.gz
|
2014-10-15 11:47:19 +00:00
|
|
|
checksum="057f660799be2307d2eefa694da9d3fce8e165807948f5bcaa04f72845d2f529"
|
2014-06-22 05:51:26 +00:00
|
|
|
;;
|
|
|
|
i686)
|
2014-06-22 10:24:51 +00:00
|
|
|
_arch=i386
|
2014-06-22 05:51:26 +00:00
|
|
|
_filename=jdk-${version}-linux-i586.tar.gz
|
2014-10-15 11:47:19 +00:00
|
|
|
checksum="17f396a541db09c732032185f10f9c6eb42ac7b5776814602342de9655b2e0e2"
|
2014-06-22 05:51:26 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-07-16 19:04:16 +00:00
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
|
2014-06-22 05:51:26 +00:00
|
|
|
wrksrc="jdk$_longVersion"
|
|
|
|
|
|
|
|
do_fetch() {
|
2014-07-16 19:04:16 +00:00
|
|
|
mkdir -p $wrksrc
|
|
|
|
cd $wrksrc
|
2014-06-22 05:51:26 +00:00
|
|
|
wget \
|
2014-10-15 11:47:19 +00:00
|
|
|
--no-check-certificate \
|
2014-06-22 05:51:26 +00:00
|
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
|
|
--progress=bar:force \
|
2014-07-16 19:04:16 +00:00
|
|
|
-c -O $_filename \
|
2014-06-22 05:51:26 +00:00
|
|
|
$distfiles
|
2014-07-16 19:04:16 +00:00
|
|
|
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
do_extract() {
|
|
|
|
tar xf $_filename -C ..
|
2014-06-22 05:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
sed \
|
|
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
2014-09-01 21:31:20 +00:00
|
|
|
${FILESDIR}/oracle-jdk.sh.in > 10_oracle-jdk.sh
|
2014-06-22 05:51:26 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2014-09-01 21:31:20 +00:00
|
|
|
vmkdir "usr/lib/jvm"
|
|
|
|
vinstall oracle-jdk-vars.sh 644 "usr/lib/jvm"
|
2014-06-22 05:51:26 +00:00
|
|
|
|
2014-09-01 21:31:20 +00:00
|
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
2014-07-16 16:05:42 +00:00
|
|
|
vlicense LICENSE
|
2014-09-01 23:03:01 +00:00
|
|
|
ln -s jdk${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jdk
|
2014-06-22 10:24:51 +00:00
|
|
|
|
2014-06-22 05:51:26 +00:00
|
|
|
vmkdir "etc/profile.d"
|
2014-09-01 21:31:20 +00:00
|
|
|
vinstall 10_oracle-jdk.sh 644 "etc/profile.d"
|
2014-06-22 05:51:26 +00:00
|
|
|
}
|