desktop/jre/PKGBUILD

75 lines
2.3 KiB
Bash
Raw Normal View History

2010-06-03 05:39:46 +08:00
#
# KDE SC Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=jre
2012-01-07 07:33:33 +08:00
pkgver=6u30
2010-06-03 05:39:46 +08:00
pkgrel=1
pkgdesc="Sun's java runtime environment"
arch=('i686' 'x86_64')
[ "$CARCH" = "i686" ] && ARCH=i586
2011-08-20 00:41:12 +08:00
[ "$CARCH" = "x86_64" ] && ARCH=x64
2010-06-03 05:39:46 +08:00
url="http://java.sun.com"
depends=('glibc' 'libxtst')
install="jre.install"
categories=('system')
2012-01-07 07:33:33 +08:00
source=("http://download.oracle.com/otn-pub/java/jdk/${pkgver}-b12/jdk-${pkgver}-linux-${ARCH}.bin"
2011-02-18 23:23:47 +08:00
construct.sh::http://java.net/projects/jdk-distros/sources/svn/content/trunk/utils/construct.sh?raw=true
2010-06-03 05:39:46 +08:00
jre.profile)
2011-11-28 01:59:10 +08:00
2012-01-07 08:04:06 +08:00
[ "${CARCH}" = 'i686' ] && md5sums=('e1c967b62c552bc28325619fe2649685'
2011-11-28 01:59:10 +08:00
'94065b612df0046d9ae758943f9f6a75'
'50b4f5ac4129097461d246645d73a622')
2012-01-07 07:33:33 +08:00
[ "${CARCH}" = 'x86_64' ] && md5sums=('ec5b0bf8284d13563332af059ce68c61'
2011-11-28 01:59:10 +08:00
'94065b612df0046d9ae758943f9f6a75'
'50b4f5ac4129097461d246645d73a622')
2010-06-03 05:39:46 +08:00
replaces=('j2re')
conflicts=('j2re' 'java-runtime')
provides=('j2re' 'java-runtime=6')
license=('custom')
build() {
2011-11-28 01:59:10 +08:00
cd "${srcdir}"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
mkdir unbundle-jdk
cd unbundle-jdk
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
sh "../jdk-${pkgver}-linux-${ARCH}.bin" --accept-license
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
cd ..
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
sh construct.sh unbundle-jdk linux-jdk linux-jre
2010-06-03 05:39:46 +08:00
}
package() {
2011-11-28 01:59:10 +08:00
cd "${srcdir}"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
mkdir -p "${pkgdir}/opt/java"
mv linux-jdk/jre "${pkgdir}/opt/java"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
install -Dm755 "${srcdir}/${pkgname}.profile" "${pkgdir}/etc/profile.d/${pkgname}.sh"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
mkdir -p "${pkgdir}/usr/lib/mozilla/plugins"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
if [ "${CARCH}" = 'i686' ]; then
ln -s /opt/java/jre/lib/i386/libnpjp2.so "${pkgdir}/usr/lib/mozilla/plugins"
else
ln -s /opt/java/jre/lib/amd64/libnpjp2.so "${pkgdir}/usr/lib/mozilla/plugins"
fi
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
mkdir -p "${pkgdir}/usr/share/licenses/jre"
cp "${pkgdir}/opt/java/jre/COPYRIGHT" "${pkgdir}/usr/share/licenses/jre"
cp "${pkgdir}/opt/java/jre/LICENSE" "${pkgdir}/usr/share/licenses/jre"
cp "${pkgdir}/opt/java/jre/THIRDPARTYLICENSEREADME.txt" "${pkgdir}/usr/share/licenses/jre"
2010-06-03 05:39:46 +08:00
2011-11-28 01:59:10 +08:00
# Fix system prefs folder (FS#18872)
install -dm755 "${pkgdir}/etc/.java/.systemPrefs"
2010-06-03 05:39:46 +08:00
}
2011-11-28 01:59:10 +08:00
# vim:set ts=2 sw=2 et: