summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/glassfish/README16
-rw-r--r--network/glassfish/asadmin2
-rw-r--r--network/glassfish/doinst.sh26
-rw-r--r--network/glassfish/glassfish.SlackBuild70
-rw-r--r--network/glassfish/glassfish.info12
-rw-r--r--network/glassfish/rc.glassfish21
-rw-r--r--network/glassfish/slack-desc19
7 files changed, 166 insertions, 0 deletions
diff --git a/network/glassfish/README b/network/glassfish/README
new file mode 100644
index 0000000000..d051765c40
--- /dev/null
+++ b/network/glassfish/README
@@ -0,0 +1,16 @@
+glassfish (Java EE Application Server)
+
+It is an open-source application server for the Java EE platform.
+It supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI,
+JavaServer Pages, servlets, etc.
+
+On 64bit platforms without multilib, updatetool and pkg don't work.
+
+If "asadmin start-domain" fails to start a domain after executing
+updatetool, then updatetool may have written "proxy.use.system: true"
+in "$GLASSFISH_HOME/.updatetool/init.cfg". Since Java SE depends on
+GNOME libraries to detect system proxy, system proxy should be disabled
+on slackware. In this case,
+1) try "http_proxy= asadmin start-domain" or
+2) set proxy.use.system to false in "$GLASSFISH_HOME/.updatetool/init.cfg" or
+3) remove "$GLASSFISH_HOME/.updatetool" entirely.
diff --git a/network/glassfish/asadmin b/network/glassfish/asadmin
new file mode 100644
index 0000000000..59c7b2a472
--- /dev/null
+++ b/network/glassfish/asadmin
@@ -0,0 +1,2 @@
+#!/bin/sh
+/opt/glassfish3/bin/asadmin "$@"
diff --git a/network/glassfish/doinst.sh b/network/glassfish/doinst.sh
new file mode 100644
index 0000000000..b1ea0fb9e8
--- /dev/null
+++ b/network/glassfish/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.glassfish.new
+
diff --git a/network/glassfish/glassfish.SlackBuild b/network/glassfish/glassfish.SlackBuild
new file mode 100644
index 0000000000..783527efc5
--- /dev/null
+++ b/network/glassfish/glassfish.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Slackware build script for glassfish
+
+# Written by crocket (crockabiscuit@gmail.com)
+
+PRGNAM=glassfish
+VERSION=${VERSION:-3.1.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+MAJORVER=$(echo $VERSION | cut -d. -f1)
+
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+# Bail out if user or group isn't valid on your system
+# For slackbuilds.org, assigned glassfish uid/gid are 263/263
+# See http://slackbuilds.org/uid_gid.txt
+if ! getent group glassfish 2>&1 > /dev/null; then
+ echo " You must have a \"glassfish\" group to run this script."
+ echo " # groupadd -g 263 glassfish"
+ exit 1
+elif ! getent passwd glassfish 2>&1 > /dev/null; then
+ echo " You must have a \"glassfish\" user to run this script."
+ echo " # useradd -u 263 -g glassfish -d /var/lib/glassfish -s /bin/false glassfish"
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $PKG $OUTPUT
+
+mkdir -p $PKG/opt
+unzip $CWD/$PRGNAM-$VERSION-ml.zip -d $PKG/opt
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+unzip $CWD/$PRGNAM-ose-$VERSION-docs-pdf.zip -d $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/usr/bin
+sed "s/%APPNAME%/$PRGNAM$MAJORVER/" $CWD/asadmin > $PKG/usr/bin/asadmin
+chmod +x $PKG/usr/bin/asadmin
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.glassfish > $PKG/etc/rc.d/rc.glassfish.new
+
+mkdir -p $PKG/var/lib/$PRGNAM
+
+chown -R root:root $PKG
+chown -R glassfish:glassfish $PKG/opt/$PRGNAM$MAJORVER $PKG/var/lib/$PRGNAM
+
+find $PKG \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/network/glassfish/glassfish.info b/network/glassfish/glassfish.info
new file mode 100644
index 0000000000..70f532e00d
--- /dev/null
+++ b/network/glassfish/glassfish.info
@@ -0,0 +1,12 @@
+PRGNAM="glassfish"
+VERSION="3.1.2"
+HOMEPAGE="http://glassfish.java.net/"
+DOWNLOAD="http://download.java.net/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip \
+ http://download.java.net/glassfish/3.1.2/release/glassfish-ose-3.1.2-docs-pdf.zip"
+MD5SUM="a858c4927e48ab6cd99e8f3dbdb6bdf9 \
+ d462e0f94c21d217f109a8ae4f850a14"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="crocket"
+EMAIL="crockabiscuit@gmail.com"
+APPROVED="rworkman"
diff --git a/network/glassfish/rc.glassfish b/network/glassfish/rc.glassfish
new file mode 100644
index 0000000000..3f036da0ee
--- /dev/null
+++ b/network/glassfish/rc.glassfish
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# This is an example rc script.
+# Modify it to suit your need.
+
+start()
+{
+ /bin/su -l glassfish -c /usr/bin/asadmin start-domain
+}
+
+stop()
+{
+ /bin/su -l glassfish -c /usr/bin/asadmin stop-domain
+}
+
+case "$1" in
+"start")start;;
+"stop")stop;;
+"restart")stop; start;;
+*) echo "$0 start|stop|restart"
+esac
diff --git a/network/glassfish/slack-desc b/network/glassfish/slack-desc
new file mode 100644
index 0000000000..1e027b678f
--- /dev/null
+++ b/network/glassfish/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+glassfish: glassfish (Java EE Application Server)
+glassfish:
+glassfish: It is an open-source application server for the Java EE platform.
+glassfish: It supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI,
+glassfish: JavaServer Pages, servlets, etc.
+glassfish:
+glassfish: Website : http://glassfish.java.net/
+glassfish:
+glassfish:
+glassfish:
+glassfish: