4 pkgdesc="32-bit Sun java with the new mozilla plugin for Arch x86_64"
8 url="https://jdk6.dev.java.net"
9 depends=('lib32-glibc' 'lib32-libgl' 'lib32-libx11' 'lib32-libxtst' 'mozilla-common' 'lib32-libxi')
10 makedepends=('diffutils' 'fakeroot' 'pkgconfig')
11 install=bin32-jre.install
12 bin32name=jdk-${pkgver}-dlj-linux-i586
13 source=("http://download.oracle.com/otn-pub/java/jdk/$pkgver-b13/jre-$pkgver-linux-i586.tar.gz"
14 'java-policy-settings.desktop'
18 md5sums=('78923ef097586c36a6242c54cb20abd7'
19 '6614b04176b9b7dfe26f22e9ce846801'
20 '7cd3dc10e7a37468cad4053a067dcd01'
21 'cc90df2df6fe80fab885a80036d420a1'
22 '45c15a6b4767288f2f745598455ea2bf')
25 # Create required dirs
26 cd $(ls -1d jre1.7.0_*/ | tail -1)
27 mkdir -p "$pkgdir"/{opt/java/jre,usr/{share/{,licenses/jre},lib/mozilla/plugins},etc/{.java/.systemPrefs,profile.d}}
29 # Re-order folders a bit
30 mv lib/desktop/{applications,icons,mime} "$pkgdir"/usr/share/
32 # Remove empty and redundant dirs from 'lib'
34 rmdir lib/{applet,desktop}
37 mv * "$pkgdir"/opt/java/jre
41 ln -s /opt/java/jre/lib/$_arch/libnpjp2.so "$pkgdir"/usr/lib/mozilla/plugins/libnpjp2.so
43 # Install scripts, .desktop file and licenses
44 install -m755 javaws-launcher "$pkgdir"/opt/java/jre/bin/
45 install -Dm644 java-policy-settings.desktop "$pkgdir"/usr/share/applications/java-policy-settings.desktop
46 install -m755 jre.{c,}sh "$pkgdir"/etc/profile.d/
47 cp "$pkgdir"/opt/java/jre/{COPYRIGHT,LICENSE,THIRDPARTYLICENSEREADME.txt} "$pkgdir"/usr/share/licenses/jre/
49 # Tweak the javaws .desktop file
50 sed -e 's/Exec=javaws/&-launcher %f/' -e '/NoDisplay=true/d' -i "$pkgdir"/usr/share/applications/sun-javaws.desktop