updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / bin32-jre / PKGBUILD
blobcc09a7875e8613034b5f0ec27a89319c072f22fb
1 pkgname=bin32-jre
2 pkgver=7u2
3 pkgrel=1
4 pkgdesc="32-bit Sun java with the new mozilla plugin for Arch x86_64"
5 arch=('x86_64')
6 _arch=i386
7 license=('custom')
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'
15         'jre.sh'
16         'jre.csh'
17         'javaws-launcher')
18 md5sums=('78923ef097586c36a6242c54cb20abd7'
19          '6614b04176b9b7dfe26f22e9ce846801'
20          '7cd3dc10e7a37468cad4053a067dcd01'
21          'cc90df2df6fe80fab885a80036d420a1'
22          '45c15a6b4767288f2f745598455ea2bf')
24 package() {
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'
33   rm -r plugin
34   rmdir lib/{applet,desktop}
36   # Move stuff in place
37   mv * "$pkgdir"/opt/java/jre
39   # Symlink the plugin
40   cd "$srcdir"
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