Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] community/openjdk7: install profile file

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Thu, 10 Dec 2015 21:22:06 +0100

Use it to set JAVA_HOME which is used by some java applications like
android studio or apache maven.
---
 community/openjdk7/APKBUILD | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/community/openjdk7/APKBUILD b/community/openjdk7/APKBUILD
index cb913ba..05f078b 100644
--- a/community/openjdk7/APKBUILD
+++ b/community/openjdk7/APKBUILD
_at_@ -5,7 +5,7 @@ _icedteaver=2.6.3
 # pkgver is <JDK version>.<JDK update>
 # check icedtea JDK when updating
 pkgver=7.91.$_icedteaver
-pkgrel=1
+pkgrel=2
 pkgdesc="Sun OpenJDK 7 via IcedTea"
 url="http://icedtea.classpath.org/"
 arch="all"
_at_@ -204,6 +204,11 @@ jrebase() {
 
 	# pax mark again (due to fakeroot xattr handling bug)
 	$_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE
+
+	# install profile file in /etc/profile.d
+	mkdir -p "$pkgdir"/etc/profile.d
+	echo "export JAVA_HOME=\"\${JAVA_HOME:-$INSTALL_BASE/jre}\"" \
+		> "$pkgdir/etc/profile.d/$pkgname.sh" || return 1
 }
 
 jre() {
-- 
2.6.4
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Dec 10 2015 - 21:22:06 GMT