diff options
Diffstat (limited to 'user/java-common')
-rw-r--r-- | user/java-common/APKBUILD | 22 | ||||
-rw-r--r-- | user/java-common/java-common.trigger | 13 |
2 files changed, 35 insertions, 0 deletions
diff --git a/user/java-common/APKBUILD b/user/java-common/APKBUILD new file mode 100644 index 000000000..12259b209 --- /dev/null +++ b/user/java-common/APKBUILD @@ -0,0 +1,22 @@ +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=java-common +pkgver=6 +pkgrel=0 +pkgdesc="Default Java runtime binary symlinks" +url=" " +arch="noarch" +options="!check" # Symlinks only. +license="Public-Domain" +depends="" +makedepends="" +subpackages="" +source="" +triggers="java-common.trigger=/usr/lib/jvm" + +package() { + mkdir -p "$pkgdir"/usr/bin + ln -sf ../lib/jvm/default-jvm/jre/bin/java "$pkgdir"/usr/bin + ln -sf ../lib/jvm/default-jvm/jre/bin/rmiregistry "$pkgdir"/usr/bin + ln -sf ../lib/jvm/default-jvm/jre/bin/keytool "$pkgdir"/usr/bin + ln -sf ../lib/jvm/default-jvm/bin/appletviewer "$pkgdir"/usr/bin +} diff --git a/user/java-common/java-common.trigger b/user/java-common/java-common.trigger new file mode 100644 index 000000000..6d0613d48 --- /dev/null +++ b/user/java-common/java-common.trigger @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -x /usr/lib/jvm/forced-jvm ]; then + ln -sfn forced-jvm default-jvm + exit 0 +fi + +cd /usr/lib/jvm +LATEST=`ls -d java-* | sort -r | head -1` +if [ "$LATEST" ]; then + ln -sfn $LATEST default-jvm +fi + |