summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/jre/PKGBUILD
blob: ca22f01634139a8d26687a2d5ba16b0e1c816185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Based on official Arch package by Jason Chu <jason@archlinux.org>
pkgname=jre
pkgver=6u12
pkgrel=1
pkgdesc="Sun's java runtime environment"
arch=(i686 x86_64)
[ "$CARCH" = "i686" ] && _arch=i586
[ "$CARCH" = "x86_64" ] && _arch=amd64
url="http://java.sun.com"
depends=('glibc' 'libstdc++5')
install="jre.install"
source=(http://download.java.net/dlj/binaries/jdk-$pkgver-dlj-linux-$_arch.bin
https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh
jre.profile)
[ "$CARCH" = "i686" ] && md5sums=('560a51cfeecc4918d01ca29abc858d52'
'94065b612df0046d9ae758943f9f6a75'
'50b4f5ac4129097461d246645d73a622')
[ "$CARCH" = "x86_64" ] && md5sums=('9dce878be77b4a93337fa85b40b29069'
'94065b612df0046d9ae758943f9f6a75'
'50b4f5ac4129097461d246645d73a622')
replaces=('j2re')
conflicts=('j2re' 'java-runtime')
provides=('j2re' 'java-runtime')
license=('custom')

build() {
	cd $startdir/src

	mkdir unbundle-jdk
	cd unbundle-jdk

	sh ../jdk-$pkgver-dlj-linux-$_arch.bin --accept-license

	cd ..

	sh construct.sh unbundle-jdk linux-jdk linux-jre

	mkdir -p $startdir/pkg/opt/java
	mv linux-jdk/jre $startdir/pkg/opt/java

	install -D -m755 $startdir/src/${pkgname}.profile $startdir/pkg/etc/profile.d/${pkgname}.sh

	if [ "$CARCH" = "i686" ]; then
		mkdir -p $startdir/pkg/usr/lib/mozilla/plugins
		ln -s /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so $startdir/pkg/usr/lib/mozilla/plugins
	elif [ "$CARCH" = "x86_64" ]; then
		mkdir -p $startdir/pkg/usr/lib/mozilla/plugins
		ln -s /opt/java/jre/lib/amd64/libnpjp2.so $startdir/pkg/usr/lib/mozilla/plugins
	fi

	mkdir -p $startdir/pkg/usr/share/licenses/jre
	cp $startdir/pkg/opt/java/jre/COPYRIGHT $startdir/pkg/usr/share/licenses/jre
	cp $startdir/pkg/opt/java/jre/LICENSE $startdir/pkg/usr/share/licenses/jre
	cp $startdir/pkg/opt/java/jre/THIRDPARTYLICENSEREADME.txt $startdir/pkg/usr/share/licenses/jre
}