aboutsummaryrefslogtreecommitdiffstats
path: root/java7-environment-compat/PKGBUILD
blob: 7487d5731911043cc68e982480a219c4b7d2d6bc (plain) (blame)
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
56
# Maintainer:  Mattias Andrée

pkgname=java7-environment-compat
pkgver=7.7.13
pkgrel=1
_ver=7u13
_build=b20
_docver=7u11
_docbuild=b21
pkgdesc='Java 7 Development Kit that can be install alongside any other version, includes extracted library source code, Java API in HTML and some /usr/bin/*7 commands'
url=http://www.oracle.com/technetwork/java/javase/downloads/index.html
arch=(i686 x86_64)
license=(custom)
makedepends=(unzip)
DLAGENTS=('http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u --header "Cookie:oraclelicensejdk-${_ver}-oth-JPR=accept-securebackup-cookie;gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk${_ver}-downloads-1836413.html"')
source=("http://download.oracle.com/otn-pub/java/jdk/$_ver-$_build/jdk-$_ver-linux-x64.tar.gz"
	"http://download.oracle.com/otn-pub/java/jdk/$_docver-$_docbuild/jdk-$_docver-apidocs.zip")
md5sums=(5286b7e752fb8814d85124cb623ff045 e953632be4ac21cfeda756f263a9e193)

## javase: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
## apidoc: http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html

[ "${CARCH}" == 'i686' ] &&
  source[0]="http://download.oracle.com/otn-pub/java/jdk/$_ver-$_build/jdk-$_ver-linux-i586.tar.gz" &&
  md5sums[0]=2e129b77f7c2640dde08c267ed000c49

_binfiles="appletviewer jar jarsigner java javac javadoc javah javap jdb serialver"

build()
{
	msg "Extracting library source code"
	cd $srcdir/jdk1.7.*
	mkdir src
	mv src.zip src
	cd src
	unzip src.zip
	unlink src.zip
}

package()
{
	msg "Correcting file structure"
	mkdir -p $pkgdir/opt/jdk7
	mv $srcdir/* $pkgdir/opt/jdk7
	unlink $pkgdir/opt/jdk7/jdk-*-apidocs.zip
	unlink $pkgdir/opt/jdk7/jdk-*-linux-*.tar.gz
	mv $pkgdir/opt/jdk7/jdk1.7.*/* $pkgdir/opt/jdk7
	rmdir $pkgdir/opt/jdk7/jdk1.7.*
	mkdir -p $pkgdir/usr/bin
	
	msg "Making command symlinks to /usr/bin/"
	for file in $_binfiles; do
	    echo "Making link /usr/bin/${file}7 -> /opt/jdk7/bin/${file}"
	    ln -s /opt/jdk7/bin/${file} $pkgdir/usr/bin/${file}7
	done
}