diff options
author | Mário Antunes <mariolpantunes@gmail.com> | 2014-10-05 08:01:01 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-10-05 08:01:01 +0700 |
commit | a6a57a4c8a6da1106e8d91bba9b09c6c4e3a08a9 (patch) | |
tree | 96e010c7a50e952f687638f0c509b46852563a71 /network/jetty/jetty.SlackBuild | |
parent | 5e2ef622ec8109d7ad552b367223dc142ca96008 (diff) | |
download | slackbuilds-a6a57a4c8a6da1106e8d91bba9b09c6c4e3a08a9.tar.gz |
network/jetty: Updated for version 9.2.3.v20140905.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/jetty/jetty.SlackBuild')
-rw-r--r-- | network/jetty/jetty.SlackBuild | 71 |
1 files changed, 45 insertions, 26 deletions
diff --git a/network/jetty/jetty.SlackBuild b/network/jetty/jetty.SlackBuild index b20f98445b..9433633980 100644 --- a/network/jetty/jetty.SlackBuild +++ b/network/jetty/jetty.SlackBuild @@ -1,20 +1,24 @@ #!/bin/sh # # Slackware build script for openfire -# Written by Mário Antunes (mariolpantunes@gmail.com) +# Written by Mário Antunes (mariolpantunes@gmail.com) -PRGNAM="jetty" -VERSION=${VERSION:-9.0.7.v20131107} +PRGNAM=jetty +VERSION=${VERSION:-9.2.3.v20140905} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} - ARCH=noarch - CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$( uname -m )" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + set -e rm -rf $PKG @@ -22,37 +26,52 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-distribution-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-distribution-$VERSION.tar.*z cd $PRGNAM-distribution-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p $PKG/opt/$PRGNAM/ -cp -a bin/ $PKG/opt/$PRGNAM/ -cp -a etc/ $PKG/opt/$PRGNAM/ -cp -a lib/ $PKG/opt/$PRGNAM/ -cp -a logs/ $PKG/opt/$PRGNAM/ -cp -a resources/ $PKG/opt/$PRGNAM/ -cp -a start.d/ $PKG/opt/$PRGNAM/ -cp -a start.ini $PKG/opt/$PRGNAM/ -cp -a start.jar $PKG/opt/$PRGNAM/ -cp -a webapps/ $PKG/opt/$PRGNAM/ -cp -a webapps.demo/ $PKG/opt/$PRGNAM/ - -mkdir -p $PKG/etc/rc.d/ -ln -sv ../../opt/$PRGNAM/bin/jetty.sh $PKG/etc/rc.d/rc.jetty - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ - grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - +mkdir -p $PKG/var/log/$PRGNAM +mkdir -p $PKG/etc/{profile.d,rc.d} mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a *.html *.txt $PKG/usr/doc/$PRGNAM-$VERSION + +cp -a bin demo-base etc lib modules resources start.d \ + start.ini start.jar webapps $PKG/opt/$PRGNAM/ + +cat << EOF > $PKG/etc/rc.d/rc.jetty +#!/bin/sh +export JAVA="/usr/lib$LIBDIRSUFFIX/java/bin/java" +export JETTY_HOME="/opt/$PRGNAM" +export JETTY_CONF="\$JETTY_HOME/etc/jetty.conf" +export JETTY_LOGS="/var/log/$PRGNAM" +/opt/jetty/bin/jetty.sh "\$@" +EOF + +chmod 0755 $PKG/etc/rc.d/* + +cp -a *.html *.txt *.TXT $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; + +cat << EOF > $PKG/etc/profile.d/$PRGNAM.csh +#!/bin/csh +setenv JETTY_HOME="/opt/$PRGNAM" +setenv JETTY_CONF="\$JETTY_HOME/etc/jetty.conf" +setenv JETTY_LOGS="/var/log/$PRGNAM" +EOF + +cat << EOF > $PKG/etc/profile.d/$PRGNAM.sh +#!/bin/sh +export JETTY_HOME="/opt/$PRGNAM" +export JETTY_CONF="\$JETTY_HOME/etc/jetty.conf" +export JETTY_LOGS="/var/log/$PRGNAM" +EOF + +chmod 0755 $PKG/etc/profile.d/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |