diff options
-rw-r--r-- | network/znc/README | 10 | ||||
-rw-r--r-- | network/znc/README.SLACKWARE (renamed from network/znc/README.SBo) | 6 | ||||
-rw-r--r-- | network/znc/doinst.sh | 22 | ||||
-rw-r--r-- | network/znc/rc.znc | 2 | ||||
-rw-r--r-- | network/znc/slack-desc | 2 | ||||
-rw-r--r-- | network/znc/znc.SlackBuild | 35 | ||||
-rw-r--r-- | network/znc/znc.info | 10 |
7 files changed, 40 insertions, 47 deletions
diff --git a/network/znc/README b/network/znc/README index b1b643f379..f7883c1632 100644 --- a/network/znc/README +++ b/network/znc/README @@ -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 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: 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 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: ZNC_USER=nobody ./znc.SlackBuild -See README.SBo for configuration information. +See README.SLACKWARE for configuration information. diff --git a/network/znc/README.SBo b/network/znc/README.SLACKWARE index a9972a7b5c..b9467bb1ca 100644 --- a/network/znc/README.SBo +++ b/network/znc/README.SLACKWARE @@ -1,8 +1,9 @@ -znc README.SBo +znc README.SLACKWARE Once the package is installed, you should create your config file using 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 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 the init script supplied with the package, but it might be worth knowing just in case. - diff --git a/network/znc/doinst.sh b/network/znc/doinst.sh index d888165f22..a1600c56bc 100644 --- a/network/znc/doinst.sh +++ b/network/znc/doinst.sh @@ -1,22 +1,22 @@ config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy rm $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... } - -# Keep same perms on rc.znc.new: -if [ -e etc/rc.d/rc.znc ]; then - cp -a etc/rc.d/rc.znc etc/rc.d/rc.znc.new.incoming - cat etc/rc.d/rc.znc.new > etc/rc.d/rc.znc.new.incoming - mv etc/rc.d/rc.znc.new.incoming etc/rc.d/rc.znc.new -fi - +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} config etc/rc.d/rc.znc.new +preserve_perms etc/rc.d/rc.znc.new diff --git a/network/znc/rc.znc b/network/znc/rc.znc index bdc68e9a60..6fe3405415 100644 --- a/network/znc/rc.znc +++ b/network/znc/rc.znc @@ -4,7 +4,7 @@ # User account under which ZNC should run; only change this if you # know what you are doing :-) -ZNC_USER="_ZNC_USER_" +ZNC_USER="@ZNC_USER@" # First, a sanity check if [[ ! -e /etc/znc/configs/znc.conf ]]; then diff --git a/network/znc/slack-desc b/network/znc/slack-desc index 28b1fad159..b97a02cd4c 100644 --- a/network/znc/slack-desc +++ b/network/znc/slack-desc @@ -5,7 +5,7 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| + |-----handy-ruler------------------------------------------------------| znc: ZNC (an advanced IRC bouncer) znc: znc: ZNC will remain connected to an IPv4 or IPv6 IRC server even while you 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 diff --git a/network/znc/znc.info b/network/znc/znc.info index 25293974fb..426d269144 100644 --- a/network/znc/znc.info +++ b/network/znc/znc.info @@ -1,10 +1,10 @@ PRGNAM="znc" -VERSION="0.076" +VERSION="0.096" HOMEPAGE="http://en.znc.in/wiki/ZNC" -DOWNLOAD="http://downloads.sourceforge.net/znc/znc-0.076.tar.gz" -MD5SUM="03c2804b91225e83884f06078f6db568" +DOWNLOAD="http://downloads.sourceforge.net/znc/znc-0.096.tar.gz" +MD5SUM="38eec4f1911a68b4d2fc704170e7cbf6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Sean Donner" -EMAIL="sean.donner at gmail dot com" -APPROVED="Erik Hanson" +EMAIL="sean.donner@gmail.com" +APPROVED="rworkman" |