summaryrefslogtreecommitdiffstats
path: root/network/znc/znc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/znc/znc.SlackBuild')
-rw-r--r--network/znc/znc.SlackBuild35
1 files changed, 17 insertions, 18 deletions
diff --git a/network/znc/znc.SlackBuild b/network/znc/znc.SlackBuild
index 35f6d3a507..d5da0fa26e 100644
--- a/network/znc/znc.SlackBuild
+++ b/network/znc/znc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for ZNC
-# Copyright 2007-2009 Sean Donner (sean.donner at gmail dot com)
+# Copyright 2007-2009 Sean Donner (sean.donner@gmail.com)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=znc
-VERSION=0.076
+VERSION=0.096
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -31,13 +31,12 @@ ZNC_USER=${ZNC_USER:-znc}
WITH_SSL=${WITH_SSL:-yes}
WITH_IPV6=${WITH_IPV6:-yes}
WITH_CARES=${WITH_CARES:-no}
+WITH_PERL=${WITH_PERL:-no}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -56,16 +55,13 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
# Bail if user and/or group isn't valid on your system
# uid=219 is suggested to avoid conflicts with other SBo packages,
# but it's your call: http://slackbuilds.org/uid_gid.txt
if ! grep -q "^$ZNC_USER:" /etc/passwd; then
- echo " You must have a $ZNC_USR user to run this script. "
+ echo " You must have a $ZNC_USER user to run this script. "
echo " Something like this should suffice for most systems: "
echo " # useradd -u 219 -g 99 -c \"ZNC User\" -d /etc/znc $ZNC_USER"
exit 1
@@ -100,6 +96,12 @@ else
do_cares="--enable-c-ares"
fi
+if [ "$WITH_PERL" != "yes" ]; then
+ do_perl="--disable-c-ares"
+else
+ do_perl="--enable-perl"
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -112,17 +114,14 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-extra \
$do_openssl \
$do_ipv6 \
- $do_cares
+ $do_cares \
+ $do_perl
make all
make install DESTDIR=$PKG
-( cd $PKG
- find . -exec file {} + | sed -n '/ELF.*executable\|shared object/s/:.*$//p' | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . -exec file {} + | sed -n '/current ar archive/s/:.*$//p' | \
- xargs strip --strip-debug 2> /dev/null || true
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Change the ownership of the configuration directory
mkdir -p $PKG/etc/znc
@@ -130,7 +129,7 @@ chown -R $ZNC_USER $PKG/etc/znc
# Install an init script
mkdir -p $PKG/etc/rc.d
-sed -e "s/_ZNC_USER_/$ZNC_USER/g" -e "s/_VERSION_/$VERSION/g" $CWD/rc.znc \
+sed -e "s/@ZNC_USER@/$ZNC_USER/g" -e "s/@VERSION@/$VERSION/g" $CWD/rc.znc \
> $PKG/etc/rc.d/rc.znc.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -138,8 +137,8 @@ cp -a \
AUTHORS LICENSE* README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-sed s/_ZNC_USER_/$ZNC_USER/g $CWD/README.SBo > \
- $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
+sed "s/@ZNC_USER@/$ZNC_USER/g" $CWD/README.SLACKWARE > \
+ $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc