Mail archive
alpine-aports

[alpine-aports] [PATCH 2/2] main/openjdk7: install profile to /etc/profile.d

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Fri, 2 Oct 2015 18:52:23 +0200

---
 main/openjdk7/APKBUILD | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/main/openjdk7/APKBUILD b/main/openjdk7/APKBUILD
index 0325f10..d5fb04f 100644
--- a/main/openjdk7/APKBUILD
+++ b/main/openjdk7/APKBUILD
_at_@ -1,3 +1,4 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Timo Teras <timo.teras_at_iki.fi>
 # Maintainer: Timo Teras <timo.teras_at_iki.fi>
 pkgname=openjdk7
_at_@ -5,7 +6,7 @@ _icedteaver=2.6.1
 # pkgver is <JDK version>.<JDK update>
 # check icedtea JDK when updating
 pkgver=7.85.$_icedteaver
-pkgrel=0
+pkgrel=1
 pkgdesc="Sun OpenJDK 7 via IcedTea"
 url="http://icedtea.classpath.org/"
 arch="all"
_at_@ -168,6 +169,13 @@ package() {
 
 	# pax mark again (due to fakeroot xattr handling bug)
 	$_builddir/pax-mark-vm "$pkgdir"/$INSTALL_BASE
+
+	# install profile file in /etc/profile.d
+	mkdir -p "$pkgdir"/etc/profile.d
+	cat > "$pkgdir/etc/profile.d/$pkgname.sh" <<EOF
+export JAVA_HOME="\${JAVA_HOME:-$INSTALL_BASE/jre}"
+export PATH="\$PATH:\$JAVA_HOME/bin:$INSTALL_BASE/bin"
+EOF
 }
 
 jrelib() {
-- 
2.6.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Oct 02 2015 - 18:52:23 GMT