summaryrefslogtreecommitdiff
path: root/community/java-oracle
diff options
context:
space:
mode:
Diffstat (limited to 'community/java-oracle')
-rw-r--r--community/java-oracle/PKGBUILD146
-rw-r--r--community/java-oracle/derby-network-server64
-rw-r--r--community/java-oracle/derby-network-server.conf2
-rw-r--r--community/java-oracle/java-control-panel.desktop12
-rw-r--r--community/java-oracle/java-monitoring-and-management-console.desktop9
-rw-r--r--community/java-oracle/java-policy-settings.desktop10
-rw-r--r--community/java-oracle/java-visualvm.desktop11
-rw-r--r--community/java-oracle/java-web-start.desktop13
-rw-r--r--community/java-oracle/javaws-launcher7
-rw-r--r--community/java-oracle/jdk.install7
-rw-r--r--community/java-oracle/jdk.profile4
-rw-r--r--community/java-oracle/jdk.profile.csh4
-rw-r--r--community/java-oracle/jre.install20
-rw-r--r--community/java-oracle/jre.profile2
-rw-r--r--community/java-oracle/jre.profile.csh4
15 files changed, 315 insertions, 0 deletions
diff --git a/community/java-oracle/PKGBUILD b/community/java-oracle/PKGBUILD
new file mode 100644
index 000000000..61cce1d2a
--- /dev/null
+++ b/community/java-oracle/PKGBUILD
@@ -0,0 +1,146 @@
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: kfgz <kfgz at interia dot pl>
+# Contributor: Army <gmail.com: uli[dot]armbruster>
+# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+# Contributor: Guillaume ALAUX <Guillaume at alaux dot net>
+# Contributor: Charles Ghislain <charlyghislain at gmail dot com>
+
+pkgbase=java-oracle
+pkgname=('jre' 'jdk')
+pkgver=7
+pkgrel=2
+arch=('i686' 'x86_64')
+ [ "${CARCH}" = 'i686' ] && _arch='i586'
+ [ "${CARCH}" = 'x86_64' ] && _arch='x64'
+url='http://jdk7.java.net/'
+license=('custom')
+source=("http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-${_arch}.tar.gz"
+ 'java-control-panel.desktop'
+ 'java-monitoring-and-management-console.desktop'
+ 'java-policy-settings.desktop'
+ 'java-visualvm.desktop'
+ 'java-web-start.desktop'
+ 'jre.profile'
+ 'jre.profile.csh'
+ 'jdk.profile'
+ 'jdk.profile.csh'
+ 'derby-network-server'
+ 'derby-network-server.conf'
+ 'javaws-launcher')
+[ "${CARCH}" = 'i686' ] && md5sums=('f97244a104f03731e5ff69f0dd5a9927')
+[ "${CARCH}" = 'x86_64' ] && md5sums=('b3c1ef5faea7b180469c129a49762b64')
+md5sums+=('e4d814c0f310d77ed6990c731bccd0fb'
+ '4bc2b0be93f76ed07b471e3c89eb5a8a'
+ '8e3cec7ab641ec449cabd068be583f5c'
+ '9ba148ebabce8ed3351b813a9a66b6e5'
+ '619ec32235dcfe454234ef4316f8a7cc'
+ '7cd3dc10e7a37468cad4053a067dcd01'
+ 'cc90df2df6fe80fab885a80036d420a1'
+ 'b83ab5742651b4234b7d2e20785c6693'
+ '6f4cbf332816d2c4e9578ecd1d0dce7f'
+ 'a279e195e249000646895d93e199860d'
+ '4bdff6982c66d24a879c424aaac3d04d'
+ '45c15a6b4767288f2f745598455ea2bf')
+
+package_jre() {
+ pkgdesc="Oracle's Java Runtime Environment"
+ depends=('libxtst')
+ provides=('java-runtime=7')
+ conflicts=('java-runtime')
+ install='jre.install'
+
+ # main files
+ mkdir -p ${pkgdir}/opt/java
+ cp -r jdk1.7.0/jre ${pkgdir}/opt/java
+
+ # profiles
+ install -D ${srcdir}/jre.profile \
+ ${pkgdir}/etc/profile.d/jre.sh
+ install -D ${srcdir}/jre.profile.csh \
+ ${pkgdir}/etc/profile.d/jre.csh
+
+ # java browser plugin
+ mkdir -p ${pkgdir}/usr/lib/mozilla/plugins
+ if [ "$CARCH" = "i686" ]; then
+ ln -s /opt/java/jre/lib/i386/libnpjp2.so \
+ ${pkgdir}/usr/lib/mozilla/plugins
+ else
+ ln -s /opt/java/jre/lib/amd64/libnpjp2.so \
+ ${pkgdir}/usr/lib/mozilla/plugins
+ fi
+
+ # licenses
+ install -d ${pkgdir}/usr/share/licenses/jre
+ install -m644 ${pkgdir}/opt/java/jre/COPYRIGHT \
+ ${pkgdir}/usr/share/licenses/jre
+ install -m644 ${pkgdir}/opt/java/jre/LICENSE \
+ ${pkgdir}/usr/share/licenses/jre
+ install -m644 ${pkgdir}/opt/java/jre/THIRDPARTYLICENSEREADME.txt \
+ ${pkgdir}/usr/share/licenses/jre
+
+ # Fix system prefs folder FS#18872
+ install -d ${pkgdir}/etc/.java/.systemPrefs
+
+ # Clicking a .jnlp file does not launch that file but launch javaws -viewer instead FS#22509
+ install ${srcdir}/javaws-launcher \
+ ${pkgdir}/opt/java/jre/bin
+}
+
+package_jdk() {
+ pkgdesc="Oracle's Java Development Kit"
+ depends=('jre')
+ provides=('java-environment=7')
+ conflicts=('java-environment')
+ install='jdk.install'
+
+ #copy icon
+ install -D -m644 ${srcdir}/jdk1.7.0/jre/lib/desktop/icons/hicolor/48x48/apps/sun-java.png \
+ ${pkgdir}/usr/share/pixmaps/java.png
+
+ # main files
+ install -d ${pkgdir}/opt
+ mv jdk1.7.0 ${pkgdir}/opt/java
+
+ # cleanup jre folder
+ rm -rf ${pkgdir}/opt/java/jre
+ # can not package src.zip due to international use restrictions for certain countries
+ rm ${pkgdir}/opt/java/src.zip
+ # remove windows specific batch files
+ find ${pkgdir}/opt/java -name '*\.bat' -delete
+
+ # profiles
+ install -D ${srcdir}/jdk.profile \
+ ${pkgdir}/etc/profile.d/jdk.sh
+ install -D ${srcdir}/jdk.profile.csh \
+ ${pkgdir}/etc/profile.d/jdk.csh
+
+ # licenses
+ install -d ${pkgdir}/usr/share/licenses/jdk
+ install -m644 ${pkgdir}/opt/java/COPYRIGHT \
+ ${pkgdir}/usr/share/licenses/jdk
+ install -m644 ${pkgdir}/opt/java/LICENSE \
+ ${pkgdir}/usr/share/licenses/jdk
+ install -m644 ${pkgdir}/opt/java/THIRDPARTYLICENSEREADME.txt \
+ ${pkgdir}/usr/share/licenses/jdk
+
+ # desktop entries
+ install -Dm644 ${srcdir}/java-control-panel.desktop \
+ ${pkgdir}/usr/share/applications/java-control-panel.desktop
+ install -Dm644 ${srcdir}/java-monitoring-and-management-console.desktop \
+ ${pkgdir}/usr/share/applications/java-monitoring-and-management-console.desktop
+ install -Dm644 ${srcdir}/java-policy-settings.desktop \
+ ${pkgdir}/usr/share/applications/java-policy-settings.desktop
+ install -Dm644 ${srcdir}/java-visualvm.desktop \
+ ${pkgdir}/usr/share/applications/java-visualvm.desktop
+ install -Dm644 ${srcdir}/java-web-start.desktop \
+ ${pkgdir}/usr/share/applications/java-web-start.desktop
+
+ # javadb (apache derby) daemon files FS#21186
+ install -D ${srcdir}/derby-network-server \
+ ${pkgdir}/etc/rc.d/derby-network-server
+ install -D -m644 ${srcdir}/derby-network-server.conf \
+ ${pkgdir}/etc/conf.d/derby-network-server
+}
+
diff --git a/community/java-oracle/derby-network-server b/community/java-oracle/derby-network-server
new file mode 100644
index 000000000..f2b36ea56
--- /dev/null
+++ b/community/java-oracle/derby-network-server
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile.d/jdk.sh
+. $DERBY_HOME/bin/derby_common.sh
+
+DAEMON_NAME="derby-network-server"
+DAEMON_CONF="/etc/conf.d/$DAEMON_NAME"
+DAEMON_PID="/var/run/$DAEMON_NAME.pid"
+
+[ -f $DAEMON_CONF ] && . $DAEMON_CONF
+
+DERBY_START_CMD="$JAVACMD $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start"
+DERBY_STOP_CMD="$JAVACMD $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl shutdown"
+
+case "$1" in
+ start)
+ stat_busy "Starting Derby Network Server"
+
+ if ck_daemon $DAEMON_NAME; then
+ $DERBY_START_CMD > /dev/null &
+
+ PID=`ps ax | grep -v grep | grep derby | grep org.apache.derby.drda.NetworkServerControl | awk '{print $1}'`
+
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ echo $PID > $DAEMON_PID
+ add_daemon $DAEMON_NAME
+ sleep 2
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Derby Network Server"
+
+ if ck_daemon $DAEMON_NAME; then
+ stat_fail
+ else
+ $DERBY_STOP_CMD > /dev/null &
+
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f $DAEMON_PID
+ rm_daemon $DAEMON_NAME
+ stat_done
+ fi
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+
diff --git a/community/java-oracle/derby-network-server.conf b/community/java-oracle/derby-network-server.conf
new file mode 100644
index 000000000..ef7478254
--- /dev/null
+++ b/community/java-oracle/derby-network-server.conf
@@ -0,0 +1,2 @@
+DERBY_OPTS="-Dderby.stream.error.file=/var/log/derby.log"
+
diff --git a/community/java-oracle/java-control-panel.desktop b/community/java-oracle/java-control-panel.desktop
new file mode 100644
index 000000000..476e04a82
--- /dev/null
+++ b/community/java-oracle/java-control-panel.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Exec=/opt/java/bin/jcontrol
+GenericName[cs]=Nastavení prostředí Java
+GenericName=Java Environment Settings
+Icon=java
+Name[cs]=Nastavení Javy
+Name=Java Control Panel
+Path=
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Settings;Java;
diff --git a/community/java-oracle/java-monitoring-and-management-console.desktop b/community/java-oracle/java-monitoring-and-management-console.desktop
new file mode 100644
index 000000000..c0e1e59f6
--- /dev/null
+++ b/community/java-oracle/java-monitoring-and-management-console.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Exec=/opt/java/bin/jconsole
+Icon=java
+Name[cs]=Konzole monitorování a správy prostředí Java
+Name=Java Monitoring and Management Console
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/community/java-oracle/java-policy-settings.desktop b/community/java-oracle/java-policy-settings.desktop
new file mode 100644
index 000000000..1009301b1
--- /dev/null
+++ b/community/java-oracle/java-policy-settings.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Exec=/opt/java/bin/policytool
+Icon=java
+Name[cs]=Nastavení politiky Java aplikací
+Name=Java Policy Settings
+Path=
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Settings;Java;
diff --git a/community/java-oracle/java-visualvm.desktop b/community/java-oracle/java-visualvm.desktop
new file mode 100644
index 000000000..8aa9527c8
--- /dev/null
+++ b/community/java-oracle/java-visualvm.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Exec=/opt/java/bin/jvisualvm
+GenericName[cs]=Nástroj pro monitorování a sledování výkonu Java aplikací
+GenericName=Java Monitoring and Performance Monitoring Tool
+Icon=java
+Name=Java VisualVM
+Path=
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/community/java-oracle/java-web-start.desktop b/community/java-oracle/java-web-start.desktop
new file mode 100644
index 000000000..a8a25f9e2
--- /dev/null
+++ b/community/java-oracle/java-web-start.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Exec=/opt/java/jre/bin/javaws-launcher %f
+GenericName[cs]=Spravovat a spouštět aplikace Java Web Start
+GenericName=Manage and run Java Web Start Applications
+Icon=java
+MimeType=application/x-java-jnlp-file;
+Name[cs]=Java Web Start
+Name=Java Web Start
+Path=
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Network;Java;
diff --git a/community/java-oracle/javaws-launcher b/community/java-oracle/javaws-launcher
new file mode 100644
index 000000000..2831dfcbb
--- /dev/null
+++ b/community/java-oracle/javaws-launcher
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -z "$@" ]; then
+ exec javaws -viewer
+else
+ exec javaws "$@"
+fi
diff --git a/community/java-oracle/jdk.install b/community/java-oracle/jdk.install
new file mode 100644
index 000000000..abe08b6a0
--- /dev/null
+++ b/community/java-oracle/jdk.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo "The jdk package is licensed software."
+ echo "You MUST read and agree to the license stored in"
+ echo "/opt/java/LICENSE before using it."
+
+ echo 'Please relogin to include jdk in your PATH'
+}
diff --git a/community/java-oracle/jdk.profile b/community/java-oracle/jdk.profile
new file mode 100644
index 000000000..f9d5deb68
--- /dev/null
+++ b/community/java-oracle/jdk.profile
@@ -0,0 +1,4 @@
+export J2SDKDIR=/opt/java
+export PATH=$PATH:/opt/java/bin:/opt/java/db/bin
+export JAVA_HOME=/opt/java
+export DERBY_HOME=/opt/java/db
diff --git a/community/java-oracle/jdk.profile.csh b/community/java-oracle/jdk.profile.csh
new file mode 100644
index 000000000..3626e7287
--- /dev/null
+++ b/community/java-oracle/jdk.profile.csh
@@ -0,0 +1,4 @@
+setenv J2SDKDIR /opt/java
+setenv PATH ${PATH}:/opt/java/bin:/opt/java/db/bin
+setenv JAVA_HOME /opt/java
+setenv DERBY_HOME /opt/java/db
diff --git a/community/java-oracle/jre.install b/community/java-oracle/jre.install
new file mode 100644
index 000000000..111da3c2a
--- /dev/null
+++ b/community/java-oracle/jre.install
@@ -0,0 +1,20 @@
+post_install() {
+ echo "The jre package is licensed software."
+ echo "You MUST read and agree to the license stored in"
+ echo "/opt/java/jre/LICENSE before using it."
+ if [ -f /etc/mailcap ] ; then
+ sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap
+ fi
+ echo 'application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s' >>/etc/mailcap
+
+ echo 'Please relogin to include jre in your PATH.'
+}
+
+post_remove() {
+ mailcap=$(grep -v 'application/x-java-jnlp-file' /etc/mailcap)
+ if [ "$mailcap" != "" ] ; then
+ sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap
+ else
+ rm /etc/mailcap
+ fi
+}
diff --git a/community/java-oracle/jre.profile b/community/java-oracle/jre.profile
new file mode 100644
index 000000000..ded0efe81
--- /dev/null
+++ b/community/java-oracle/jre.profile
@@ -0,0 +1,2 @@
+export PATH=$PATH:/opt/java/jre/bin
+export JAVA_HOME=${JAVA_HOME:-/opt/java/jre}
diff --git a/community/java-oracle/jre.profile.csh b/community/java-oracle/jre.profile.csh
new file mode 100644
index 000000000..a4e72ddf4
--- /dev/null
+++ b/community/java-oracle/jre.profile.csh
@@ -0,0 +1,4 @@
+setenv PATH ${PATH}:/opt/java/jre/bin
+if (! "$?JAVA_HOME" ) then
+ setenv JAVA_HOME /opt/java/jre
+endif