From a31fe528bf0fd9b02f1c4850a183096f99d33c73 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Sat, 26 Mar 2011 22:11:53 +0000 Subject: testing/java-common: new aport a meta package that setups links for default java virtual machine --- testing/java-common/APKBUILD | 24 ++++++++++++++++++++++++ testing/java-common/java-common.trigger | 13 +++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 testing/java-common/APKBUILD create mode 100644 testing/java-common/java-common.trigger (limited to 'testing') diff --git a/testing/java-common/APKBUILD b/testing/java-common/APKBUILD new file mode 100644 index 000000000..d5e3e4d38 --- /dev/null +++ b/testing/java-common/APKBUILD @@ -0,0 +1,24 @@ +# Contributor: Timo Teras +# Maintainer: Timo Teras +pkgname=java-common +pkgver=0.1 +pkgrel=0 +pkgdesc="Java common (updates java links)" +url="http://git.alpinelinux.org/aports.git" +arch="noarch" +license="GPL2" +depends= +makedepends="" +install="" +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/testing/java-common/java-common.trigger b/testing/java-common/java-common.trigger new file mode 100644 index 000000000..6d0613d48 --- /dev/null +++ b/testing/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 + -- cgit v1.2.3