summaryrefslogtreecommitdiffstats
path: root/base/jdk/Pkgfile
blob: 8f026356cf3ac768de67f204de30e322d06ae45f (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
# Description: Contient l'environnement de developpement Sun's Java
# URL: http://java.sun.com/javase/downloads/index.jsp
# Maintainer: NuTyX coreteam
# Packager: thierryn1 at hispeed dot ch

name=jdk
version=6u24
release=1
[ "`uname -m`" == "i686"   ] && _ARCH=i586
[ "`uname -m`" == "x86_64"   ] && _ARCH=amd64

source=(http://download.java.net/dlj/binaries/$name-$version-dlj-linux-${_ARCH}.bin \
        jdk.sh https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh )

build() {
	mkdir -p $PKG/etc/profile.d/
	mkdir -p $PKG/opt
	mv jdk.sh $PKG/etc/profile.d/
	chmod 755 $name-$version-dlj-linux-${_ARCH}.bin
	mkdir unbundle-jdk
	cd unbundle-jdk
       	sh ../jdk-${version}-dlj-linux-${_ARCH}.bin --accept-license
	cd ..
	
	sh construct.sh unbundle-jdk linux-jdk linux-jre
	mv linux-jdk $PKG/opt/jdk
	mkdir -p $PKG/usr/share/
	mv $PKG/opt/jdk/man \
	$PKG/usr/share/
#	mv $PKG/opt/jdk/jre/man \
#	$PKG/usr/share/
	rm -r $PKG/opt/jdk/demo
	rm -r $PKG/opt/jdk/sample
	rm -r $PKG/opt/jdk/db/demo
	rm -r $PKG/opt/jdk/db/docs
	rm -r $PKG/opt/jdk/db/javadoc
	rm -r $PKG/opt/jdk/jre/man/ja_JP.eucJP
	rm $PKG/opt/jdk/jre/man/ja
	mv $PKG/opt/jdk/jre/man/man1/* \
	$PKG/usr/share/man/man1/
	rm -r $PKG/opt/jdk/jre/man
	rm -r $PKG/usr/share/man/ja*
	# Installation du plugin
	mkdir -p $PKG/usr/lib/firefox/plugins
	if [ ${_ARCH} = "i586" ]; then
		ln -s /opt/jdk/jre/lib/i386/libnpjp2.so $PKG/usr/lib/firefox/plugins
	else
		ln -s /opt/jdk/jre/lib/amd64/libnpjp2.so $PKG/usr/lib/firefox/plugins
	fi
}