diff options
author | Menno E. Duursma <druiloor@zonnet.nl> | 2010-05-13 00:37:13 +0200 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-05-13 00:37:13 +0200 |
commit | c34de5f8e296453fae11aac9af5f9c26920ffd6a (patch) | |
tree | c1993d0218f625bbbd0850202fb88d6b4c6a4cf0 /network/mod_evasive/mod_evasive.SlackBuild | |
parent | 6dd98402af4e6d95c8151aebbf92ef9a7a6fd561 (diff) | |
download | slackbuilds-c34de5f8e296453fae11aac9af5f9c26920ffd6a.tar.gz |
network/mod_evasive: Updated for version 1.10.1
Diffstat (limited to 'network/mod_evasive/mod_evasive.SlackBuild')
-rw-r--r-- | network/mod_evasive/mod_evasive.SlackBuild | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/network/mod_evasive/mod_evasive.SlackBuild b/network/mod_evasive/mod_evasive.SlackBuild index 607e2e5e58..5e80a3e41f 100644 --- a/network/mod_evasive/mod_evasive.SlackBuild +++ b/network/mod_evasive/mod_evasive.SlackBuild @@ -8,24 +8,26 @@ # Granted WTFPL, Version 2, as published by Sam Hocevar. See # http://sam.zoy.org/wtfpl/COPYING for more details. -# Modified by SlackBuilds.org - PRGNAM=mod_evasive VERSION=1.10.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=`pwd` + +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e # exit on most errors @@ -34,23 +36,28 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM -tar -xzvf $CWD/${PRGNAM}_${VERSION}.tar.gz +tar xvf $CWD/${PRGNAM}_${VERSION}.tar.gz cd $PRGNAM chown -R root:root . chmod -R a-s,u+w,go+r-w . # Create target dir -mkdir -p $PKG/usr/lib/httpd/modules +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/httpd/modules # Compile module as DSO (dynmically shared object) CFLAGS="$SLACKFLAGS" \ apxs -ca mod_evasive20.c # copy into place -cp -v .libs/mod_evasive20.so $PKG/usr/lib/httpd/modules +cp -v .libs/mod_evasive20.so $PKG/usr/lib${LIBDIRSUFFIX}/httpd/modules + +mkdir -p $PKG/etc/httpd/ +sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%" $CWD/mod_evasive.conf > \ + $PKG/etc/httpd/mod_evasive.conf.new ( cd $PKG || exit 1 - find . -type f | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . -type f | xargs file | grep -e "executable" -e "shared object" | \ + grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION @@ -60,6 +67,7 @@ find $PKG/usr/doc -type f -exec chmod 0644 {} \; 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.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |