72 lines
1.8 KiB
Text
72 lines
1.8 KiB
Text
# Template file for 'oracle-jdk'
|
|
pkgname=oracle-jdk
|
|
version=8u20
|
|
_longVersion=1.8.0_20
|
|
revision=5
|
|
_build=26
|
|
|
|
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"
|
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
|
hostmakedepends="wget"
|
|
provides="java-environment-${version}_1"
|
|
replaces="java-environment>=0"
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
x86_64)
|
|
_arch=amd64
|
|
_filename=jdk-${version}-linux-x64.tar.gz
|
|
checksum="3e717622ae48af5ca7298e7797cb71d4d545238f362741a83e69c097ca055de4"
|
|
;;
|
|
i686)
|
|
_arch=i386
|
|
_filename=jdk-${version}-linux-i586.tar.gz
|
|
checksum="fa013b3fcbb1308040bf0e75bbd6ef7e8396b547cbc8dd79e3cb8153604bfd06"
|
|
;;
|
|
esac
|
|
|
|
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
|
|
wrksrc="jdk$_longVersion"
|
|
|
|
do_fetch() {
|
|
mkdir -p $wrksrc
|
|
cd $wrksrc
|
|
wget \
|
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
|
--progress=bar:force \
|
|
-c -O $_filename \
|
|
$distfiles
|
|
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
|
|
}
|
|
|
|
do_extract() {
|
|
tar xf $_filename -C ..
|
|
}
|
|
|
|
do_build() {
|
|
sed \
|
|
-e "s|%LONG_VERSION%|${_longVersion}|" \
|
|
${FILESDIR}/oracle-jdk.sh.in > 10_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
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir "usr/lib/jvm"
|
|
vinstall oracle-jdk-vars.sh 644 "usr/lib/jvm"
|
|
|
|
vmkdir "usr/share/licenses/${pkgname}"
|
|
vlicense LICENSE
|
|
ln -s jdk${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jdk
|
|
|
|
vmkdir "etc/profile.d"
|
|
vinstall 10_oracle-jdk.sh 644 "etc/profile.d"
|
|
}
|