network/packit: Updated for version 1.0

This commit is contained in:
Marco Bonetti 2010-05-13 00:37:48 +02:00 committed by Robby Workman
parent 7d32b39cd3
commit f79cf07abb
6 changed files with 43 additions and 13 deletions

View file

@ -5,5 +5,4 @@ Ethernet header options, Packit can be useful in testing firewalls, intrusion
detection/prevention systems, port scanning, simulating network traffic, and
general TCP/IP auditing. Packit is also an excellent tool for learning TCP/IP.
Packit 1.0 requires libnet 1.1.2 or greater, avalaible in SlackBuilds.org
repository, as well as libpcap which is avalaible with Slackware own n/tcpdump.
This requires libnet.

View file

@ -26,7 +26,7 @@
PRGNAM=packit
VERSION=${VERSION:-1.0}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@ -37,10 +37,13 @@ DOCS="ChangeLog LICENSE docs"
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
@ -51,9 +54,6 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
zcat $CWD/tcpdump.patch.gz | patch -p1 --verbose
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -61,18 +61,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
patch -p1 < $CWD/tcpdump.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
( 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
@ -88,4 +93,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}

View file

@ -1,8 +1,10 @@
PRGNAM="packit"
VERSION="1.0"
HOMEPAGE="http://www.packetfactory.net/projects/packit/"
DOWNLOAD="http://www.packetfactory.net/projects/packit/downloads/packit-1.0.tgz"
DOWNLOAD="http://slackbuilds.org/sources/13.0/packit-1.0.tgz"
MD5SUM="270594ff97f6c203131136208bb4d2ca"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Marco Bonetti"
EMAIL="sid77@slackware.it"
APPROVED="dsomero"
APPROVED="rworkman"

View file

@ -6,8 +6,8 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
packit: Packit (Network Injection and Capture)
packit:
packit: Packit - Network Injection and Capture
packit:
packit: Packit (Packet toolkit) is a network auditing tool. Its value is
packit: derived from its ability to customize, inject, monitor, and
packit: manipulate IP traffic. By allowing you to define (spoof) nearly all

View file

@ -0,0 +1,24 @@
diff -Naur packit-1.0.orig/src/globals.h packit-1.0/src/globals.h
--- packit-1.0.orig/src/globals.h 2003-10-03 11:52:08.000000000 +0200
+++ packit-1.0/src/globals.h 2008-12-14 22:18:49.000000000 +0100
@@ -31,7 +31,7 @@
#include <libnet.h>
#include <pcap.h>
#include <sys/types.h>
-#include <net/bpf.h>
+#include <pcap-bpf.h>
#include <signal.h>
#include <time.h>
#include <stdio.h>
diff -Naur packit-1.0.orig/src/main.h packit-1.0/src/main.h
--- packit-1.0.orig/src/main.h 2003-09-27 16:22:52.000000000 +0200
+++ packit-1.0/src/main.h 2008-12-14 22:19:18.000000000 +0100
@@ -26,7 +26,7 @@
#include <libnet.h>
#include <pcap.h>
#include <sys/types.h>
-#include <net/bpf.h>
+#include <pcap-bpf.h>
#include <signal.h>
#include <time.h>
#include <stdio.h>

Binary file not shown.