aboutsummaryrefslogtreecommitdiffstats
path: root/java7-environment-compat/PKGBUILD
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-10-07 19:56:02 +0200
committerMattias Andrée <maandree@operamail.com>2012-10-07 19:56:02 +0200
commitfb71477dadcf2b6a884714f3ec1bcb956ee3f147 (patch)
treef02a3a0d2872c133eefb1d06b77cd62a5920004c /java7-environment-compat/PKGBUILD
parentSaving the world with GTK2 configuration of GNU Emacs (diff)
downloadaur-packages-fb71477dadcf2b6a884714f3ec1bcb956ee3f147.tar.gz
aur-packages-fb71477dadcf2b6a884714f3ec1bcb956ee3f147.tar.bz2
aur-packages-fb71477dadcf2b6a884714f3ec1bcb956ee3f147.tar.xz
In my opinion better jdk-compat package that includes html api doc, extract src.zip and symlinks from /usr/bin/*# to /opt/jdk#/bin/*
Diffstat (limited to 'java7-environment-compat/PKGBUILD')
-rw-r--r--java7-environment-compat/PKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/java7-environment-compat/PKGBUILD b/java7-environment-compat/PKGBUILD
new file mode 100644
index 0000000..02f6777
--- /dev/null
+++ b/java7-environment-compat/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Mattias Andrée
+
+pkgname=java7-environment-compat
+pkgver=7.7.10
+pkgrel=1
+_ver=7u7
+_build=b10
+_docver=7u6
+_docbuild=b24
+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=(15f4b80901111f002894c33a3d78124c 91d8188362c70a834697a58121b2d2a6)
+
+[ "${CARCH}" == 'i686' ] &&
+ source[0]="http://download.oracle.com/otn-pub/java/jdk/$_ver-$_build/jdk-$_ver-linux-i586.tar.gz" &&
+ md5sums[0]=5a46b8e1904cc9f94e6102f3e9d3deb8
+
+_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
+}