network/siege: Updated for version 3.0.5, added a license.
Script cleanup, moved from misc to network Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
90fc5e9538
commit
e1e1b9eeab
|
@ -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
|
||||
|
|
@ -2,14 +2,30 @@
|
|||
|
||||
# Slackware build script for Siege
|
||||
|
||||
# Written by Menno Duursma <druiloor@zonnet.nl>
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
# 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}
|
|
@ -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=""
|
Loading…
Reference in New Issue