aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2014-11-14 08:23:45 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-11-14 08:23:45 +0700
commitb95188286350c72bd5e887a7d89d9f8dbf2529b4 (patch)
tree878c177cdedbabd62011e30460da452554eb389d
parente60371d31affacace7316473cc2d9e631f64cb8c (diff)
network/glassfish: Updated for version 4.1 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/glassfish/README26
-rw-r--r--network/glassfish/doinst.sh1
-rw-r--r--network/glassfish/glassfish.SlackBuild69
-rw-r--r--network/glassfish/glassfish.info14
-rw-r--r--network/glassfish/rc.glassfish59
-rw-r--r--network/glassfish/slack-desc8
6 files changed, 120 insertions, 57 deletions
diff --git a/network/glassfish/README b/network/glassfish/README
index d051765c40340..0d54e4fd07e30 100644
--- a/network/glassfish/README
+++ b/network/glassfish/README
@@ -1,16 +1,16 @@
-glassfish (Java EE Application Server)
+Glassfish is an open-source application server for the Java EE platform.
+Glassfish is the reference implementation of Java EE and as such supports
+Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages and
+servlets.
-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.
+You must have a "glassfish" user and a "glassfish" group to run this script:
+ groupadd -g 263 glassfish
+ useradd -u 263 -g glassfish -d /var/lib/glassfish -s /bin/false glassfish
-On 64bit platforms without multilib, updatetool and pkg don't work.
+The SlackBuild will use /var/lib/glassfish to store domain and node
+configuration files. The default domain1 will be installed to /var/lib but note
+that this will be overwritten on upgrade, so it is advised to install any
+applications into a differently-named domain.
-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.
+The rc.glassfish script will operate on the default domain unless another is
+specified on the command line.
diff --git a/network/glassfish/doinst.sh b/network/glassfish/doinst.sh
index b1ea0fb9e8773..127eb56cc6389 100644
--- a/network/glassfish/doinst.sh
+++ b/network/glassfish/doinst.sh
@@ -23,4 +23,3 @@ preserve_perms() {
}
preserve_perms etc/rc.d/rc.glassfish.new
-
diff --git a/network/glassfish/glassfish.SlackBuild b/network/glassfish/glassfish.SlackBuild
index ec9d5d3b25d5e..b0c04cb2ffb16 100644
--- a/network/glassfish/glassfish.SlackBuild
+++ b/network/glassfish/glassfish.SlackBuild
@@ -2,27 +2,41 @@
# Slackware build script for glassfish
-# Written by crocket (crockabiscuit@gmail.com)
+# Copyright 2014 Benjamin Trigona-Harany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=glassfish
-VERSION=${VERSION:-3.1.2}
+VERSION=${VERSION:-4.1}
+ARCH=noarch
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}
+MAJORVER=$(echo $VERSION | cut -d. -f1)
+
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"
@@ -35,25 +49,29 @@ 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
+cd $TMP
+rm -rf $PRGNAM$MAJORVER
+unzip $CWD/$PRGNAM-$VERSION-web.zip
+cd $PRGNAM$MAJORVER
+
+mkdir -p $PKG/usr/share/$PRGNAM
+cp -r bin glassfish javadb pkg $PKG/usr/share/$PRGNAM
+find $PKG/usr/share/$PRGNAM -name "*.bat" -exec rm {} +
+sed -i "s/^\(AS_INSTALL=\).*/\1\/usr\/share\/$PRGNAM\/glassfish/g" $PKG/usr/share/$PRGNAM/bin/asadmin
+sed -i "s/^\(AS_DEF_DOMAINS_PATH=\).*/\1\"\/var\/lib\/glassfish\/domains\"/" $PKG/usr/share/$PRGNAM/glassfish/config/asenv.conf
+sed -i "s/^\(AS_DEF_NODES_PATH=\).*/\1\"\/var\/lib\/glassfish\/nodes\"/" $PKG/usr/share/$PRGNAM/glassfish/config/asenv.conf
mkdir -p $PKG/usr/bin
-sed "s/%APPNAME%/$PRGNAM$MAJORVER/" $CWD/asadmin > $PKG/usr/bin/asadmin
-chmod +x $PKG/usr/bin/asadmin
+ln -s $PKG/usr/share/$PRGNAM/bin/asadmin $PKG/usr/bin
+
+mkdir -p $PKG/var/lib/$PRGNAM
+mv $PKG/usr/share/$PRGNAM/glassfish/domains $PKG/var/lib/glassfish
+mkdir -p $PKG/var/lib/$PRGNAM/nodes
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
+chown -R glassfish:glassfish $PKG/var/lib/$PRGNAM
find $PKG \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -61,10 +79,15 @@ find $PKG \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ README.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
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
index 7448abf6141e2..2d899a65c6f3a 100644
--- a/network/glassfish/glassfish.info
+++ b/network/glassfish/glassfish.info
@@ -1,12 +1,10 @@
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"
+VERSION="4.1"
+HOMEPAGE="http://glassfish.java.net"
+DOWNLOAD="http://dlc.sun.com.edgesuite.net/glassfish/4.1/release/glassfish-4.1-web.zip"
+MD5SUM="252ab55a3ce890570092009df5fc6e6b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="jdk"
-MAINTAINER="crocket"
-EMAIL="crockabiscuit@gmail.com"
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/network/glassfish/rc.glassfish b/network/glassfish/rc.glassfish
index 3f036da0ee25c..eb4389fa52309 100644
--- a/network/glassfish/rc.glassfish
+++ b/network/glassfish/rc.glassfish
@@ -1,21 +1,64 @@
#!/bin/sh
-# This is an example rc script.
-# Modify it to suit your need.
+# Glassfish startup script for Slackware Linux
+
+# $Date: 2014/11/11 $
+#
+# Copyright 2014 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+DOMAIN=${2:-domain1}
start()
{
- /bin/su -l glassfish -c /usr/bin/asadmin start-domain
+ /usr/bin/sudo -u glassfish /usr/bin/asadmin start-domain $DOMAIN
}
stop()
{
- /bin/su -l glassfish -c /usr/bin/asadmin stop-domain
+ /usr/bin/sudo -u glassfish /usr/bin/asadmin stop-domain $DOMAIN
+}
+
+restart()
+{
+ /usr/bin/sudo -u glassfish /usr/bin/asadmin restart-domain $DOMAIN
+}
+
+status()
+{
+ /usr/bin/sudo -u glassfish /usr/bin/asadmin list-domains
}
case "$1" in
-"start")start;;
-"stop")stop;;
-"restart")stop; start;;
-*) echo "$0 start|stop|restart"
+'start')
+ start
+ ;;
+'stop')
+ stop
+ ;;
+'restart')
+ restart
+ ;;
+'status')
+ status
+ ;;
+*)
+ echo "usage $0 start|stop|restart|status [DOMAIN]"
esac
diff --git a/network/glassfish/slack-desc b/network/glassfish/slack-desc
index 09dce7202d5f1..20e30c645b30b 100644
--- a/network/glassfish/slack-desc
+++ b/network/glassfish/slack-desc
@@ -8,11 +8,11 @@
|-----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 is an open-source application server for the Java EE
+glassfish: platform. It supports Enterprise JavaBeans, JPA, JavaServer Faces,
+glassfish: JMS, RMI, JavaServer Pages and servlets.
+glassfish:
glassfish:
-glassfish: Website : http://glassfish.java.net/
glassfish:
glassfish:
glassfish: