summaryrefslogtreecommitdiffstats
path: root/network/bitlbee/bitlbee.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/bitlbee/bitlbee.SlackBuild')
-rw-r--r--network/bitlbee/bitlbee.SlackBuild42
1 files changed, 38 insertions, 4 deletions
diff --git a/network/bitlbee/bitlbee.SlackBuild b/network/bitlbee/bitlbee.SlackBuild
index 3635aac4ce..44564ac02f 100644
--- a/network/bitlbee/bitlbee.SlackBuild
+++ b/network/bitlbee/bitlbee.SlackBuild
@@ -2,7 +2,7 @@
# SlackBuild Script for bitlbee
-# Copyright 2007-2010 Michiel van Wessem, Manchester, United Kingdom
+# Copyright 2007-2011 Michiel van Wessem, Manchester, United Kingdom
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=bitlbee
-VERSION=${VERSION:-3.0.1}
+VERSION=${VERSION:-3.0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,6 +42,9 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+BITLBEE_USER=${BITLBEE_USER:-250}
+BITLBEE_GROUP=${BITLBEE_GROUP:-250}
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -78,6 +81,31 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Bail if user or group isn't valid on your system
+if ! grep ^bitlbee: /etc/passwd 2>&1 > /dev/null; then
+
+cat << EOF
+
+ You must have a bitlbee user to run this script
+
+ # groupadd -g $BITLBEE_USER bitlbee
+ # useradd -u $BITLBEE_USER -d /var/lib/bitlbee -s /bin/false -g bitlbee bitlbee
+
+EOF
+
+ exit
+elif ! grep ^bitlbee: /etc/group 2>&1 > /dev/null; then
+
+cat << EOF
+
+ You must have a bitlbee group to run this script
+ # groupadd -g $BITLBEE_GROUP bitlbee
+
+EOF
+
+ exit
+fi
+
# This seems to require gnutls to work properly...
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -85,6 +113,8 @@ CPU="$ARCH" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --pcdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
+ --plugindir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
--config=/var/lib/$PRGNAM \
--etcdir=/etc/$PRGNAM \
--datadir=/usr/doc/$PRGNAM-$VERSION \
@@ -107,7 +137,7 @@ if [ -e Makefile.settings ]; then
fi
make all
-make install install-etc install-doc install-plugins DESTDIR=$PKG
+make install install-dev install-etc install-doc install-plugins DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -132,7 +162,11 @@ sed -i 's#/etc/init.d/inetd#/etc/rc.d/rc.inetd#' {} \;
mv $PKG/etc/$PRGNAM/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
mv $PKG/etc/$PRGNAM/motd.txt $PKG/etc/$PRGNAM/motd.txt.new
-chown -R nobody:nogroup $PKG/var/lib/$PRGNAM
+chown -R $BITLBEE_USER:$BITLBEE_GROUP $PKG/var/lib/$PRGNAM
+
+mkdir -p $PKG/etc/rc.d/
+cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+chmod 0755 $PKG/etc/rc.d/rc.$PRGNAM.new
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc