1 # Maintainer: Dan Serban
2 # Contributors: Guillaume ALAUX, Daniel J Griffiths, Jason Chu, Geoffroy Carrier, Thomas Dziedzic
7 pkgdesc="Java 6 Runtime Environment"
8 url=http://www.oracle.com/technetwork/java/javase/downloads/index.html
11 depends=(glibc libxtst)
13 provides=('java-runtime=6' j2re)
14 conflicts=(java-runtime j2re jre)
20 md5sums=('7cd3dc10e7a37468cad4053a067dcd01'
21 'cc90df2df6fe80fab885a80036d420a1'
22 '45c15a6b4767288f2f745598455ea2bf')
24 [ "${CARCH}" == 'x86_64' ] && _arch=x64
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}"
34 sh ../jdk.bin --accept-license
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