Mail archive
alpine-aports

Re: [alpine-aports] [PATCH 2/2] community/openjdk8: install profile file

From: Timo Teras <timo.teras_at_iki.fi>
Date: Fri, 11 Dec 2015 08:08:39 +0200

On Thu, 10 Dec 2015 21:22:07 +0100
Sören Tempel <soeren+git_at_soeren-tempel.net> wrote:

> Use it to set JAVA_HOME which is used by some java applications like
> android studio or apache maven.

What if all java's are installed. openjdk7, openjdk8 and gcc-java.
Which one's JAVA_HOME should take preference? Should it be left up to
the execution order of profile.d? Or should we let java-common ship one
profile script that setups the JAVA_HOME to proper place? Would it be
enough to make it point to "/usr/lib/jvm/default-jvm/jre/" always?

> ---
> community/openjdk8/APKBUILD | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/community/openjdk8/APKBUILD b/community/openjdk8/APKBUILD
> index 643af10..976b3cb 100644
> --- a/community/openjdk8/APKBUILD
> +++ b/community/openjdk8/APKBUILD
> _at_@ -5,7 +5,7 @@ _java_ver=8
> _jdk_update=66
> _jdk_build=17
> pkgver=$_java_ver.$_jdk_update.$_jdk_build
> -pkgrel=1
> +pkgrel=2
> pkgdesc="Sun OpenJDK 8"
> url="http://openjdk.java.net"
> arch="x86_64 x86"
> _at_@ -145,6 +145,11 @@ package() {
> | xargs chmod go+r
>
> pax_mark_vm "$pkgdir"/$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
> }
>
> jrelib() {



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Dec 11 2015 - 08:08:39 GMT