network/glassfish: Added (Java EE Application Server)

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
crocket 2012-08-13 12:49:02 -05:00 committed by Robby Workman
parent 8aef445b4f
commit 4f143d1ef1
7 changed files with 166 additions and 0 deletions

16
network/glassfish/README Normal file
View file

@ -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.

View file

@ -0,0 +1,2 @@
#!/bin/sh
/opt/glassfish3/bin/asadmin "$@"

View file

@ -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

View file

@ -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}

View file

@ -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"

View file

@ -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

View file

@ -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: