1 # Maintainer: Dan Serban
2 # Contributors: Guillaume ALAUX, Daniel J Griffiths, Jason Chu, Geoffroy Carrier, Thomas Dziedzic
7 pkgdesc="Java 6 Development Kit"
8 url=http://www.oracle.com/technetwork/java/javase/downloads/index.html
13 provides=('java-environment=6' j2sdk)
14 conflicts=(java-environment j2sdk jdk)
17 source=('java-control-panel.desktop'
18 'java-monitoring-and-management-console.desktop'
19 'java-policy-settings.desktop'
20 'java-visualvm.desktop'
21 'java-web-start.desktop'
24 'derby-network-server'
25 'derby-network-server.conf')
26 md5sums=('e4d814c0f310d77ed6990c731bccd0fb'
27 '4bc2b0be93f76ed07b471e3c89eb5a8a'
28 '8e3cec7ab641ec449cabd068be583f5c'
29 '9ba148ebabce8ed3351b813a9a66b6e5'
30 '619ec32235dcfe454234ef4316f8a7cc'
31 'b83ab5742651b4234b7d2e20785c6693'
32 '6f4cbf332816d2c4e9578ecd1d0dce7f'
33 'a279e195e249000646895d93e199860d'
34 '4bdff6982c66d24a879c424aaac3d04d')
36 [ "${CARCH}" == 'x86_64' ] && _arch=x64
40 rm jdk.bin 2>/dev/null || true
41 _url=$(lynx -dump http://www.oracle.com/technetwork/java/javase/downloads/index.html | grep -o http.*downloads/jdk-6u[0-9][0-9]-download.*html)
42 _url=$(wget -qO - ${_url} | grep -o http.*${_arch}.bin)
43 wget -O jdk.bin "${_url}"
46 sh ../jdk.bin --accept-license
48 wget -O construct.sh "http://java.net/projects/jdk-distros/sources/svn/content/trunk/utils/construct.sh?raw=true"
49 sh construct.sh unbundle-jdk linux-jdk linux-jre
50 install -Dm644 "${srcdir}"/linux-jdk/jre/lib/desktop/icons/hicolor/48x48/apps/sun-java.png "${pkgdir}"/usr/share/pixmaps/java.png
52 install -d "${pkgdir}"/opt
53 mv linux-jdk "${pkgdir}"/opt/java
54 install -D "${srcdir}"/jdk.profile "${pkgdir}"/etc/profile.d/jdk.sh
55 install -D "${srcdir}"/jdk.profile.csh "${pkgdir}"/etc/profile.d/jdk.csh
56 mkdir -p "${pkgdir}"/usr/share/licenses/jdk
57 install -m644 "${pkgdir}"/opt/java/COPYRIGHT "${pkgdir}"/usr/share/licenses/jdk
58 install -m644 "${pkgdir}"/opt/java/LICENSE "${pkgdir}"/usr/share/licenses/jdk
59 install -m644 "${pkgdir}"/opt/java/THIRDPARTYLICENSEREADME.txt "${pkgdir}"/usr/share/licenses/jdk
60 install -Dm644 "${srcdir}"/java-control-panel.desktop "${pkgdir}"/usr/share/applications/java-control-panel.desktop
61 install -Dm644 "${srcdir}"/java-monitoring-and-management-console.desktop "${pkgdir}"/usr/share/applications/java-monitoring-and-management-console.desktop
62 install -Dm644 "${srcdir}"/java-policy-settings.desktop "${pkgdir}"/usr/share/applications/java-policy-settings.desktop
63 install -Dm644 "${srcdir}"/java-visualvm.desktop "${pkgdir}"/usr/share/applications/java-visualvm.desktop
64 install -Dm644 "${srcdir}"/java-web-start.desktop "${pkgdir}"/usr/share/applications/java-web-start.desktop
65 install -D "${srcdir}"/derby-network-server "${pkgdir}"/etc/rc.d/derby-network-server
66 install -Dm644 "${srcdir}"/derby-network-server.conf "${pkgdir}"/etc/conf.d/derby-network-server
67 for i in kinit ktab klist; do
68 rm "${pkgdir}"/opt/java/bin/${i}
69 rm "${pkgdir}"/opt/java/man/ja_JP.eucJP/man1/${i}.1
70 rm "${pkgdir}"/opt/java/man/man1/${i}.1