diff options
Diffstat (limited to 'network/hping3/hping3.SlackBuild')
-rw-r--r-- | network/hping3/hping3.SlackBuild | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/network/hping3/hping3.SlackBuild b/network/hping3/hping3.SlackBuild index 7b04668ad0edb..1a076824df92c 100644 --- a/network/hping3/hping3.SlackBuild +++ b/network/hping3/hping3.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Slackware build script for hping3 TCP/IP packet assembler/analyzer -# + # Copyright 2009-2010 Marco Bonetti <sid77@slackware.it> # All rights reserved. # @@ -25,22 +25,26 @@ PRGNAM=hping3 VERSION=${VERSION:-20051105} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} + DOCS="APD.txt API.txt AS-BACKDOOR HPING2-HOWTO.txt HPING2-IS-OPEN HPING3.txt \ MORE-FUN-WITH-IPID SPOOFED_SCAN.txt hping2rc.example" 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 @@ -58,15 +62,24 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -patch -p1 < $CWD/tcl85.tcpdump.patch +# Add some of Debian's patchset +patch -p1 < $CWD/patches/libpcap0.8.diff +patch -p1 < $CWD/patches/bytesex.diff +patch -p1 < $CWD/patches/spelling.diff +patch -p1 < $CWD/patches/personality.diff +patch -p1 < $CWD/patches/tcl.diff +patch -p1 < $CWD/patches/ip_id_field.diff CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --build=$ARCH-slackware-linux -make +make \ + CCOPT="$SLKCFLAGS -DUSE_TCL" \ + INSTALL_MANPATH=/usr/man # Install is done by hand, as the Makefile doesn't understand DESTDIR # (and it's just one file) @@ -81,8 +94,10 @@ install -m 0644 docs/hping2.8 $PKG/usr/man/man8/ install -m 0644 docs/hping3.8 $PKG/usr/man/man8/ ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) ( cd $PKG/usr/man @@ -98,4 +113,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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} |