diff options
-rw-r--r-- | network/siege/README (renamed from misc/siege/README) | 0 | ||||
-rw-r--r-- | network/siege/doinst.sh | 16 | ||||
-rw-r--r-- | network/siege/siege.SlackBuild (renamed from misc/siege/siege.SlackBuild) | 54 | ||||
-rw-r--r-- | network/siege/siege.info (renamed from misc/siege/siege.info) | 6 | ||||
-rw-r--r-- | network/siege/slack-desc (renamed from misc/siege/slack-desc) | 0 |
5 files changed, 52 insertions, 24 deletions
diff --git a/misc/siege/README b/network/siege/README index 5ec3a5fccf..5ec3a5fccf 100644 --- a/misc/siege/README +++ b/network/siege/README diff --git a/network/siege/doinst.sh b/network/siege/doinst.sh new file mode 100644 index 0000000000..cebc4191d5 --- /dev/null +++ b/network/siege/doinst.sh @@ -0,0 +1,16 @@ +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... +} + +config etc/siege/siegerc.new +config etc/siege/urls.txt.new + diff --git a/misc/siege/siege.SlackBuild b/network/siege/siege.SlackBuild index 8c6ef7f864..73f4152dc4 100644 --- a/misc/siege/siege.SlackBuild +++ b/network/siege/siege.SlackBuild @@ -2,14 +2,30 @@ # Slackware build script for Siege -# Written by Menno Duursma <druiloor@zonnet.nl> - -# This program is free software. It comes without any warranty. -# Granted WTFPL, Version 2, as published by Sam Hocevar. See -# http://sam.zoy.org/wtfpl/COPYING for more details. +# Copyright 2011-2013 Heinz Wiesinger, Amsterdam, The Netherlands +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Originally written by Menno Duursma <druiloor@zonnet.nl> PRGNAM=siege -VERSION=${VERSION:-2.72} +VERSION=${VERSION:-3.0.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -50,17 +66,17 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION 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 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBDIRSUFFIX \ - --sysconfdir=/etc \ + --sysconfdir=/etc/$PRGNAM \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux @@ -68,27 +84,23 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG +for i in $PKG/etc/$PRGNAM/*; do + mv $i $i.new +done + find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html cp -a AUTHORS ChangeLog COPYING KNOWNBUGS MACHINES NEWS PLATFORM README* \ $PKG/usr/doc/$PRGNAM-$VERSION - -# Include .siegerc and url.txt examples -cp -a doc/{urls.txt,siegerc} $PKG/usr/doc/$PRGNAM-$VERSION - -# Test webpages -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html cp -a html/{README,basic.php,cache-control.php,cookie-test.php,etag.php,login.php} \ $PKG/usr/doc/$PRGNAM-$VERSION/html - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/siege/siege.info b/network/siege/siege.info index e117513d11..298e911799 100644 --- a/misc/siege/siege.info +++ b/network/siege/siege.info @@ -1,8 +1,8 @@ PRGNAM="siege" -VERSION="2.72" +VERSION="3.0.5" HOMEPAGE="http://www.joedog.org/index/siege-home" -DOWNLOAD="http://www.joedog.org/pub/siege/siege-2.72.tar.gz" -MD5SUM="6bd0b1dca6b95717e23a6bade9a0a1f4" +DOWNLOAD="http://www.joedog.org/pub/siege/siege-3.0.5.tar.gz" +MD5SUM="822cc4750a6162945ee91af98773bda4" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/misc/siege/slack-desc b/network/siege/slack-desc index 315e48f7d7..315e48f7d7 100644 --- a/misc/siege/slack-desc +++ b/network/siege/slack-desc |