diff options
Diffstat (limited to 'abs/extra-testing/community/jre')
-rw-r--r-- | abs/extra-testing/community/jre/PKGBUILD | 56 | ||||
-rw-r--r-- | abs/extra-testing/community/jre/jre.install | 33 | ||||
-rw-r--r-- | abs/extra-testing/community/jre/jre.profile | 4 |
3 files changed, 93 insertions, 0 deletions
diff --git a/abs/extra-testing/community/jre/PKGBUILD b/abs/extra-testing/community/jre/PKGBUILD new file mode 100644 index 0000000..b7ee08b --- /dev/null +++ b/abs/extra-testing/community/jre/PKGBUILD @@ -0,0 +1,56 @@ +# $Id: PKGBUILD,v 1.3 2008/12/03 02:33:37 gcarrier Exp $ +# Maintainer: Jason Chu <jason@archlinux.org> + +pkgname=jre +pkgver=6u11 +pkgrel=1 +pkgdesc="Sun's java runtime environment" +arch=(i686 x86_64) + [ "$CARCH" = "i686" ] && _arch=i586 + [ "$CARCH" = "x86_64" ] && _arch=amd64 +url="http://java.sun.com" +depends=('glibc' 'libstdc++5') +install="jre.install" +source=(http://download.java.net/dlj/binaries/jdk-$pkgver-dlj-linux-$_arch.bin + https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh + jre.profile) +[ "$CARCH" = "i686" ] && md5sums=('e5eef98bc477675c66e053fc3635e645' + '94065b612df0046d9ae758943f9f6a75' + '50b4f5ac4129097461d246645d73a622') +[ "$CARCH" = "x86_64" ] && md5sums=('0f687b6dbfe54e117bb0d9e090fda20b' + '94065b612df0046d9ae758943f9f6a75' + '50b4f5ac4129097461d246645d73a622') +replaces=('j2re') +conflicts=('j2re' 'java-runtime') +provides=('j2re' 'java-runtime') +license=('custom') + +build() { + cd $startdir/src + + mkdir unbundle-jdk + cd unbundle-jdk + + sh ../jdk-$pkgver-dlj-linux-$_arch.bin --accept-license + + cd .. + + sh construct.sh unbundle-jdk linux-jdk linux-jre + + mkdir -p $startdir/pkg/opt/java + mv linux-jdk/jre $startdir/pkg/opt/java + + install -D -m755 $startdir/src/${pkgname}.profile $startdir/pkg/etc/profile.d/${pkgname}.sh + + # no plugin for x86_64 + if [ "$CARCH" = "i686" ]; then + mkdir -p $startdir/pkg/usr/lib/mozilla/plugins + ln -s /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so $startdir/pkg/usr/lib/mozilla/plugins + else echo "no plugin for x86_64" + fi + + mkdir -p $startdir/pkg/usr/share/licenses/jre + cp $startdir/pkg/opt/java/jre/COPYRIGHT $startdir/pkg/usr/share/licenses/jre + cp $startdir/pkg/opt/java/jre/LICENSE $startdir/pkg/usr/share/licenses/jre + cp $startdir/pkg/opt/java/jre/THIRDPARTYLICENSEREADME.txt $startdir/pkg/usr/share/licenses/jre +} diff --git a/abs/extra-testing/community/jre/jre.install b/abs/extra-testing/community/jre/jre.install new file mode 100644 index 0000000..778a5fd --- /dev/null +++ b/abs/extra-testing/community/jre/jre.install @@ -0,0 +1,33 @@ +post_upgrade() { + post_install $1 +} + +post_install() { + echo "The jre package is licensed software." + echo "You MUST read and agree to the license stored in" + echo "/opt/java/jre/LICENSE before using it." + if [ -f /etc/mailcap ] ; then + sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap + fi + echo 'application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s' >>/etc/mailcap +cat << _EOF + +==> In order to have java applets support in firefox you should install +==> libxtst (pacman -S libxtst). + +_EOF + +} + +post_remove() { + mailcap=$(grep -v 'application/x-java-jnlp-file' /etc/mailcap) + if [ "$mailcap" != "" ] ; then + sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap + else + rm /etc/mailcap + fi +} + +op=$1 +shift +$op $* diff --git a/abs/extra-testing/community/jre/jre.profile b/abs/extra-testing/community/jre/jre.profile new file mode 100644 index 0000000..af3e373 --- /dev/null +++ b/abs/extra-testing/community/jre/jre.profile @@ -0,0 +1,4 @@ +export PATH=$PATH:/opt/java/jre/bin +if [ ! -f /etc/profile.d/jdk.sh ]; then + export JAVA_HOME=/opt/java/jre +fi |