void-packages/srcpkgs/oracle-jdk/template

74 lines
1.8 KiB
Plaintext
Raw Normal View History

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