oracle-jdk: add alternatives.

This commit is contained in:
Enno Boland 2015-11-13 22:58:54 +01:00
parent f6faf6bfb6
commit 7c542cd1a5
17 changed files with 75 additions and 12 deletions

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Exec=/usr/lib/jvm/oracle-jdk/bin/policytool
Icon=oracle-java.png
Name=Java Policy Settings
Path=
StartupNotify=true
Terminal=false
Type=Application
Categories=Settings;Java;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -0,0 +1 @@
export JAVA_HOME=${JAVA_HOME=/usr/lib/jvm/oracle-jdk}

View file

@ -1,2 +0,0 @@
export JAVA_HOME=${JAVA_HOME=/usr/lib/jvm/jdk%LONG_VERSION%}
export PATH="$PATH:/usr/lib/jvm/jdk%LONG_VERSION%/bin"

View file

@ -2,7 +2,7 @@
pkgname=oracle-jdk
version=8u66
_longVersion=1.8.0_66
revision=1
revision=2
_build=17
short_desc="Java Development Kit (JDK)"
@ -30,6 +30,61 @@ i686)
;;
esac
alternatives="
java:/usr/bin/java:/usr/lib/jvm/oracle-jdk/bin/java
java:/usr/bin/javaws:/usr/lib/jvm/oracle-jdk/bin/javaws
java:/usr/bin/jcontrol:/usr/lib/jvm/oracle-jdk/bin/jcontrol
java:/usr/bin/jjs:/usr/lib/jvm/oracle-jdk/bin/jjs
java:/usr/bin/keytool:/usr/lib/jvm/oracle-jdk/bin/keytool
java:/usr/bin/orbd:/usr/lib/jvm/oracle-jdk/bin/orbd
java:/usr/bin/pack200:/usr/lib/jvm/oracle-jdk/bin/pack200
java:/usr/bin/policytool:/usr/lib/jvm/oracle-jdk/bin/policytool
java:/usr/bin/rmid:/usr/lib/jvm/oracle-jdk/bin/rmid
java:/usr/bin/rmiregistry:/usr/lib/jvm/oracle-jdk/bin/rmiregistry
java:/usr/bin/servertool:/usr/lib/jvm/oracle-jdk/bin/servertool
java:/usr/bin/tnameserv:/usr/lib/jvm/oracle-jdk/bin/tnameserv
java:/usr/bin/unpack200:/usr/lib/jvm/oracle-jdk/bin/unpack200
jdk:/usr/bin/ControlPanel:/usr/lib/jvm/oracle-jdk/bin/ControlPanel
jdk:/usr/bin/appletviewer:/usr/lib/jvm/oracle-jdk/bin/appletviewer
jdk:/usr/bin/extcheck:/usr/lib/jvm/oracle-jdk/bin/extcheck
jdk:/usr/bin/idlj:/usr/lib/jvm/oracle-jdk/bin/idlj
jdk:/usr/bin/jar:/usr/lib/jvm/oracle-jdk/bin/jar
jdk:/usr/bin/jarsigner:/usr/lib/jvm/oracle-jdk/bin/jarsigner
jdk:/usr/bin/java-rmi.cgi:/usr/lib/jvm/oracle-jdk/bin/java-rmi.cgi
jdk:/usr/bin/javac:/usr/lib/jvm/oracle-jdk/bin/javac
jdk:/usr/bin/javadoc:/usr/lib/jvm/oracle-jdk/bin/javadoc
jdk:/usr/bin/javafxpackager:/usr/lib/jvm/oracle-jdk/bin/javafxpackager
jdk:/usr/bin/javah:/usr/lib/jvm/oracle-jdk/bin/javah
jdk:/usr/bin/javap:/usr/lib/jvm/oracle-jdk/bin/javap
jdk:/usr/bin/javapackager:/usr/lib/jvm/oracle-jdk/bin/javapackager
jdk:/usr/bin/jcmd:/usr/lib/jvm/oracle-jdk/bin/jcmd
jdk:/usr/bin/jconsole:/usr/lib/jvm/oracle-jdk/bin/jconsole
jdk:/usr/bin/jdb:/usr/lib/jvm/oracle-jdk/bin/jdb
jdk:/usr/bin/jdeps:/usr/lib/jvm/oracle-jdk/bin/jdeps
jdk:/usr/bin/jhat:/usr/lib/jvm/oracle-jdk/bin/jhat
jdk:/usr/bin/jinfo:/usr/lib/jvm/oracle-jdk/bin/jinfo
jdk:/usr/bin/jmap:/usr/lib/jvm/oracle-jdk/bin/jmap
jdk:/usr/bin/jmc:/usr/lib/jvm/oracle-jdk/bin/jmc
jdk:/usr/bin/jmc.ini:/usr/lib/jvm/oracle-jdk/bin/jmc.ini
jdk:/usr/bin/jps:/usr/lib/jvm/oracle-jdk/bin/jps
jdk:/usr/bin/jrunscript:/usr/lib/jvm/oracle-jdk/bin/jrunscript
jdk:/usr/bin/jsadebugd:/usr/lib/jvm/oracle-jdk/bin/jsadebugd
jdk:/usr/bin/jstack:/usr/lib/jvm/oracle-jdk/bin/jstack
jdk:/usr/bin/jstat:/usr/lib/jvm/oracle-jdk/bin/jstat
jdk:/usr/bin/jstatd:/usr/lib/jvm/oracle-jdk/bin/jstatd
jdk:/usr/bin/jvisualvm:/usr/lib/jvm/oracle-jdk/bin/jvisualvm
jdk:/usr/bin/native2ascii:/usr/lib/jvm/oracle-jdk/bin/native2ascii
jdk:/usr/bin/rmic:/usr/lib/jvm/oracle-jdk/bin/rmic
jdk:/usr/bin/schemagen:/usr/lib/jvm/oracle-jdk/bin/schemagen
jdk:/usr/bin/serialver:/usr/lib/jvm/oracle-jdk/bin/serialver
jdk:/usr/bin/wsgen:/usr/lib/jvm/oracle-jdk/bin/wsgen
jdk:/usr/bin/wsimport:/usr/lib/jvm/oracle-jdk/bin/wsimport
jdk:/usr/bin/xjc:/usr/lib/jvm/oracle-jdk/bin/xjc
java-plugin:/usr/lib/mozilla/plugins/libnpjp2.so:/usr/lib/jvm/oracle-jdk/jre/lib/$_arch/libnpjp2.so
"
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}-b${_build}/${_filename}"
wrksrc="jdk$_longVersion"
@ -50,9 +105,6 @@ do_extract() {
}
do_build() {
sed \
-e "s|%LONG_VERSION%|${_longVersion}|" \
${FILESDIR}/oracle-jdk.sh.in > 10_oracle-jdk.sh
sed \
-e "s|%LONG_VERSION%|${_longVersion}|" \
-e "s|%ORACLE_JDK_URL%|${distfiles}|" \
@ -61,13 +113,16 @@ do_build() {
}
do_install() {
vmkdir "usr/lib/jvm"
vinstall oracle-jdk-vars.sh 644 "usr/lib/jvm"
vmkdir "usr/share/licenses/${pkgname}"
vlicense LICENSE
vinstall oracle-jdk-vars.sh 644 "usr/lib/jvm/"
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
vinstall $FILESDIR/java-policy-settings.desktop 644 usr/share/applications
ln -s jdk${_longVersion} ${DESTDIR}/usr/lib/jvm/oracle-jdk
vmkdir "etc/profile.d"
vinstall 10_oracle-jdk.sh 644 "etc/profile.d"
for i in 16 20 22 24 32 40 48 64 72 96 128 256 512; do
vinstall $FILESDIR/oracle-jdk-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
done
vinstall $FILESDIR/oracle-jdk.sh 644 "etc/profile.d" 11_oracle-jdk.sh
}