network/znc: Updated for version 0.096.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Sean Donner 2010-11-28 02:26:02 -06:00 committed by Heinz Wiesinger
parent 14a1280975
commit 3638387f02
7 changed files with 40 additions and 47 deletions

View File

@ -1,4 +1,4 @@
ZNC is an advanced IRC bouncer ZNC is an advanced IRC bouncer.
ZNC will remain connected to an IPv4 or IPv6 IRC server even while you ZNC will remain connected to an IPv4 or IPv6 IRC server even while you
are offline. You can reattach your client at a later time and catch up are offline. You can reattach your client at a later time and catch up
@ -15,15 +15,9 @@ simply run the build script like this:
IPv6 support is also enabled by default; to disable it, run the script as: IPv6 support is also enabled by default; to disable it, run the script as:
WITH_IPV6=no ./znc.SlackBuild WITH_IPV6=no ./znc.SlackBuild
New since version 0.074 is the ability to use the 'c-ares' library. This
package is available on SBo and will slightly increase performance
by being able to do asynchronous DNS requests. By default this option
is off, to enable it run the script as:
WITH_CARES=yes ./znc.SlackBuild
This is intended to be run as a nonprivileged user - by default, the This is intended to be run as a nonprivileged user - by default, the
build script uses "znc" as the user. If you wish to change it, e.g. build script uses "znc" as the user. If you wish to change it, e.g.
to use the "nobody" user, then run the script as follows: to use the "nobody" user, then run the script as follows:
ZNC_USER=nobody ./znc.SlackBuild ZNC_USER=nobody ./znc.SlackBuild
See README.SBo for configuration information. See README.SLACKWARE for configuration information.

View File

@ -1,8 +1,9 @@
znc README.SBo znc README.SLACKWARE
Once the package is installed, you should create your config file using Once the package is installed, you should create your config file using
znc's own interactive utility; run the following command: znc's own interactive utility; run the following command:
su - _ZNC_USER_ -c '/usr/bin/znc --makeconf --datadir /etc/znc' su - @ZNC_USER@ -c '/usr/bin/znc --makeconf --datadir /etc/znc'
where '@ZNC_USER@' is replaced by the UID that you wish znc to run under
Since znc is configured to run as a nonprivileged user by default in Since znc is configured to run as a nonprivileged user by default in
this build script, you must choose a listening port higher than 1024. this build script, you must choose a listening port higher than 1024.
@ -15,4 +16,3 @@ will look for its configuation file in ~/.znc (which is /etc/znc/.znc
as suggested by the build script). This is irrelevant if you are using as suggested by the build script). This is irrelevant if you are using
the init script supplied with the package, but it might be worth knowing the init script supplied with the package, but it might be worth knowing
just in case. just in case.

View File

@ -1,22 +1,22 @@
config() { config() {
NEW="$1" NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)" OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then if [ ! -r $OLD ]; then
mv $NEW $OLD mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW rm $NEW
fi fi
# Otherwise, we leave the .new copy for the admin to consider...
} }
preserve_perms() {
# Keep same perms on rc.znc.new: NEW="$1"
if [ -e etc/rc.d/rc.znc ]; then OLD="$(dirname $NEW)/$(basename $NEW .new)"
cp -a etc/rc.d/rc.znc etc/rc.d/rc.znc.new.incoming if [ -e $OLD ]; then
cat etc/rc.d/rc.znc.new > etc/rc.d/rc.znc.new.incoming cp -a $OLD ${NEW}.incoming
mv etc/rc.d/rc.znc.new.incoming etc/rc.d/rc.znc.new cat $NEW > ${NEW}.incoming
fi mv ${NEW}.incoming $NEW
fi
config $NEW
}
config etc/rc.d/rc.znc.new config etc/rc.d/rc.znc.new
preserve_perms etc/rc.d/rc.znc.new

View File

@ -4,7 +4,7 @@
# User account under which ZNC should run; only change this if you # User account under which ZNC should run; only change this if you
# know what you are doing :-) # know what you are doing :-)
ZNC_USER="_ZNC_USER_" ZNC_USER="@ZNC_USER@"
# First, a sanity check # First, a sanity check
if [[ ! -e /etc/znc/configs/znc.conf ]]; then if [[ ! -e /etc/znc/configs/znc.conf ]]; then

View File

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

View File

@ -1,10 +1,10 @@
PRGNAM="znc" PRGNAM="znc"
VERSION="0.076" VERSION="0.096"
HOMEPAGE="http://en.znc.in/wiki/ZNC" HOMEPAGE="http://en.znc.in/wiki/ZNC"
DOWNLOAD="http://downloads.sourceforge.net/znc/znc-0.076.tar.gz" DOWNLOAD="http://downloads.sourceforge.net/znc/znc-0.096.tar.gz"
MD5SUM="03c2804b91225e83884f06078f6db568" MD5SUM="38eec4f1911a68b4d2fc704170e7cbf6"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
MAINTAINER="Sean Donner" MAINTAINER="Sean Donner"
EMAIL="sean.donner at gmail dot com" EMAIL="sean.donner@gmail.com"
APPROVED="Erik Hanson" APPROVED="rworkman"