summaryrefslogtreecommitdiff
path: root/network/openfire/openfire.SlackBuild
diff options
context:
space:
mode:
authorMário Antunes <mariolpantunes@gmail.com>2017-06-06 23:15:06 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-06-10 10:47:38 +0700
commitc62deab46b69c69bffb7c3f4ea17e5495e3a8ab2 (patch)
tree1ede1015c4c3d8e7ecc7e36267863fc5d8ab33fe /network/openfire/openfire.SlackBuild
parentb24c8432844dfc41c1236dab10194c642b788c8c (diff)
downloadslackbuilds-c62deab46b69c69bffb7c3f4ea17e5495e3a8ab2.tar.gz
network/openfire: Updated for version 4.1.4.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/openfire/openfire.SlackBuild')
-rw-r--r--network/openfire/openfire.SlackBuild37
1 files changed, 23 insertions, 14 deletions
diff --git a/network/openfire/openfire.SlackBuild b/network/openfire/openfire.SlackBuild
index a7724796d0..44fb36eabb 100644
--- a/network/openfire/openfire.SlackBuild
+++ b/network/openfire/openfire.SlackBuild
@@ -1,11 +1,10 @@
#!/bin/sh
#
-# Slackware build script for Zeromq-jzmq
-# Written by Mário Antunes (mario.antunes@av.it.pt)
-# Modified by the slackbuilds.org project
+# Slackware build script for openfire
+# Written by Mário Antunes (mariolpantunes@gmail.com)
PRGNAM=openfire
-VERSION=${VERSION:-3.7.1}
+VERSION=${VERSION:-4.1.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -24,9 +23,6 @@ OPENFIRE_UID=${OPENFIRE_UID:-265}
OPENFIRE_GROUP=${OPENFIRE_GROUP:-openfire}
OPENFIRE_GID=${OPENFIRE_GID:-265}
-# Installation path
-PREFIX=/opt/openfire
-
bailout() {
echo " You must have a $OPENFIRE_USER user and $OPENFIRE_GROUP group to run this script. "
echo " Something like this should suffice for most systems: "
@@ -49,16 +45,18 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM\_$SRCVER.tar.gz
cd $PRGNAM
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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -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 {} \;
+
+# Installation path
+PREFIX=/opt/$PRGNAM
mkdir -p $PKG$PREFIX/
cp -a bin/ $PKG$PREFIX/
@@ -72,6 +70,17 @@ cp -a resources/ $PKG$PREFIX/
mkdir -p $PKG/var/log/$PRGNAM
chown -R $OPENFIRE_USER:$OPENFIRE_GROUP $PKG$PREFIX $PKG/var/log/$PRGNAM
+mkdir -p $PKG/etc/profile.d
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.sh
+#!/bin/sh
+export openfireHome=/opt/openfire
+EOF
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.csh
+#!/bin/csh
+setenv openfireHome /opt/openfire
+EOF
+chmod 755 $PKG/etc/profile.d/*
+
mkdir -p $PKG/etc/rc.d
sed \
-e "s|@OPENFIRE_USER@|$OPENFIRE_USER|" \
@@ -79,8 +88,8 @@ sed \
$CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM
chmod 755 $PKG/etc/rc.d/rc.$PRGNAM
-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
+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/usr/doc/$PRGNAM-$VERSION
cp -a *.html documentation/ $PKG/usr/doc/$PRGNAM-$VERSION