updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / jre6 / PKGBUILD
blob21ef39371e69468aecf917057e92f56852b5f178
1 # Maintainer: Dan Serban
2 # Contributors: Guillaume ALAUX, Daniel J Griffiths, Jason Chu, Geoffroy Carrier, Thomas Dziedzic
4 pkgname=jre6
5 pkgver=6
6 pkgrel=1
7 pkgdesc="Java 6 Runtime Environment"
8 url=http://www.oracle.com/technetwork/java/javase/downloads/index.html
9 arch=(i686 x86_64)
10 license=(custom)
11 depends=(glibc libxtst)
12 makedepends=(lynx)
13 provides=('java-runtime=6' j2re)
14 conflicts=(java-runtime j2re jre)
15 replaces=(j2re)
16 install=jre.install
17 source=('jre.profile'
18         'jre.profile.csh'
19         'javaws-launcher')
20 md5sums=('7cd3dc10e7a37468cad4053a067dcd01'
21          'cc90df2df6fe80fab885a80036d420a1'
22          '45c15a6b4767288f2f745598455ea2bf')
23 _arch=i586
24 [ "${CARCH}" == 'x86_64' ] && _arch=x64
26 build()
28   rm jdk.bin 2>/dev/null || true
29   _url=$(lynx -dump http://www.oracle.com/technetwork/java/javase/downloads/index.html | grep -o http.*downloads/jdk-6u[0-9]*-download.*html | head -1)
30   _url=$(wget -qO - ${_url} | grep -o http.*${_arch}.bin)
31   wget -O jdk.bin "${_url}"
32   mkdir unbundle-jdk
33   cd unbundle-jdk
34   sh ../jdk.bin --accept-license
35   cd ..
36   wget -O construct.sh "http://java.net/projects/jdk-distros/sources/svn/content/trunk/utils/construct.sh?raw=true"
37   sh construct.sh unbundle-jdk linux-jdk linux-jre
38   mkdir -p "${pkgdir}"/opt/java
39   mv linux-jdk/jre "${pkgdir}"/opt/java/
40   install -Dm644 "${startdir}"/jre.profile "${pkgdir}"/etc/profile.d/jre.sh
41   install -Dm644 "${startdir}"/jre.profile.csh "${pkgdir}"/etc/profile.d/jre.csh
42   mkdir -p "${pkgdir}"/usr/lib/mozilla/plugins
43   [ "${CARCH}" = "i686" ] && ln -s /opt/java/jre/lib/i386/libnpjp2.so "${pkgdir}"/usr/lib/mozilla/plugins/libnpjp2.so
44   [ "${CARCH}" = "x86_64" ] && ln -s /opt/java/jre/lib/amd64/libnpjp2.so "${pkgdir}"/usr/lib/mozilla/plugins/libnpjp2.so
45   mkdir -p "${pkgdir}"/usr/share/licenses/jre
46   install -Dm644 "${pkgdir}"/opt/java/jre/COPYRIGHT "${pkgdir}"/usr/share/licenses/jre/COPYRIGHT
47   install -Dm644 "${pkgdir}"/opt/java/jre/LICENSE "${pkgdir}"/usr/share/licenses/jre/LICENSE
48   install -Dm644 "${pkgdir}"/opt/java/jre/THIRDPARTYLICENSEREADME.txt "${pkgdir}"/usr/share/licenses/jre/THIRDPARTYLICENSEREADME.txt
49   mkdir -p "${pkgdir}"/etc/.java/.systemPrefs
50   install "${startdir}"/javaws-launcher "${pkgdir}"/opt/java/jre/bin/javaws-launcher