summaryrefslogtreecommitdiffstats
path: root/python/dpkt
diff options
context:
space:
mode:
author Vincent Batts2011-07-03 19:50:26 +0200
committer Niels Horn2011-07-15 02:54:02 +0200
commit764009e81fd8970993da7671be5520b364f0c29f (patch)
treef911de82740ec2e88b62857c37c0e9099686ebf5 /python/dpkt
parent167bca5c9dd1f8e601de1aa3fcc94fac02890649 (diff)
downloadslackbuilds-764009e81fd8970993da7671be5520b364f0c29f.tar.gz
python/dpkt: Added (python TCP/IP packet library)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'python/dpkt')
-rw-r--r--python/dpkt/README5
-rw-r--r--python/dpkt/dpkt.SlackBuild69
-rw-r--r--python/dpkt/dpkt.info10
-rw-r--r--python/dpkt/slack-desc19
4 files changed, 103 insertions, 0 deletions
diff --git a/python/dpkt/README b/python/dpkt/README
new file mode 100644
index 0000000000..2f3b3959e3
--- /dev/null
+++ b/python/dpkt/README
@@ -0,0 +1,5 @@
+dpkt (python TCP/IP packet library)
+
+fast, simple packet creation / parsing, with definitions for the
+basic TCP/IP protocols.
+
diff --git a/python/dpkt/dpkt.SlackBuild b/python/dpkt/dpkt.SlackBuild
new file mode 100644
index 0000000000..4abcb8cfbc
--- /dev/null
+++ b/python/dpkt/dpkt.SlackBuild
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Slackware build script for dpkt
+
+# Written by Vincent Batts, vbatts@hashbangbash.com
+
+PRGNAM=dpkt
+VERSION=${VERSION:-1.7}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+python setup.py install --root=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS CHANGES HACKING LICENSE README examples/ \
+ $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/python/dpkt/dpkt.info b/python/dpkt/dpkt.info
new file mode 100644
index 0000000000..b53544202b
--- /dev/null
+++ b/python/dpkt/dpkt.info
@@ -0,0 +1,10 @@
+PRGNAM="dpkt"
+VERSION="1.7"
+HOMEPAGE="http://dpkt.googlecode.com/"
+DOWNLOAD="http://dpkt.googlecode.com/files/dpkt-1.7.tar.gz"
+MD5SUM="0baa25fd5d87066cf6189a66cf452ac0"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Vincent Batts"
+EMAIL="vbatts@hashbangbash.com"
+APPROVED="dsomero"
diff --git a/python/dpkt/slack-desc b/python/dpkt/slack-desc
new file mode 100644
index 0000000000..8e45df02bf
--- /dev/null
+++ b/python/dpkt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+dpkt: dpkt (python TCP/IP packet library)
+dpkt:
+dpkt: fast, simple packet creation / parsing, with definitions for the
+dpkt: basic TCP/IP protocols.
+dpkt:
+dpkt:
+dpkt:
+dpkt:
+dpkt:
+dpkt:
+dpkt: