openjdk11: move /etc/profile.d/10-openjdk*.sh to trigger

This commit is contained in:
classabbyamp 2022-03-20 16:12:04 -04:00 committed by Andrew J. Hesford
parent 259cbdc15d
commit 5fee6cd20a

View File

@ -1,7 +1,7 @@
# Template file for 'openjdk11'
pkgname=openjdk11
version=11.0.12+7
revision=1
revision=2
_java_ver="${version%%.*}"
_jdk_home="usr/lib/jvm/openjdk${_java_ver}"
wrksrc="jdk${_java_ver}u-jdk-${version}"
@ -160,7 +160,8 @@ openjdk11-jre_package() {
shlib_provides="libawt.so libawt_xawt.so libjava.so libjli.so libjvm.so libjawt.so"
short_desc+=" - runtime components"
provides="java-runtime-${version}_1"
depends="fontconfig"
depends="fontconfig xbps-triggers>=0.122_1"
triggers="openjdk-profile"
alternatives="
java:/usr/bin/java:/${_jdk_home}/bin/java
java:/usr/bin/jjs:/${_jdk_home}/bin/jjs
@ -179,11 +180,6 @@ openjdk11-jre_package() {
vmove $_jdk_home/$f
done
vmkdir etc/profile.d
cat >>${PKGDESTDIR}/etc/profile.d/10_openjdk11.sh <<EOF
export JAVA_HOME=\${JAVA_HOME=/usr/lib/jvm/openjdk${_java_ver}}
EOF
vlicense ASSEMBLY_EXCEPTION
vlicense LICENSE
}