aboutsummaryrefslogtreecommitdiff
path: root/network/p0f/p0f.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/p0f/p0f.SlackBuild')
-rw-r--r--network/p0f/p0f.SlackBuild46
1 files changed, 28 insertions, 18 deletions
diff --git a/network/p0f/p0f.SlackBuild b/network/p0f/p0f.SlackBuild
index 5d4866d4b356..1f5fe1b3a3aa 100644
--- a/network/p0f/p0f.SlackBuild
+++ b/network/p0f/p0f.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for p0f
-# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
+# Copyright 2012 David Spencer, Baildon, West Yorkshire, U.K.
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
# Modified by the SlackBuilds.org project
PRGNAM=p0f
-VERSION=${VERSION:-2.0.8}
+VERSION=${VERSION:-3.05b}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -61,33 +61,43 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
-cd $PRGNAM
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-make p0f \
- CFLAGS="$SLKCFLAGS \
- -DUSE_BPF=\\\"pcap-bpf.h\\\" \
- -I/usr/include/pcap" \
- -f mk/Linux
+# Set default location of fingerprint file:
+sed -i 's;"p0f.fp";"/etc/p0f/p0f.fp";' config.h
+
+# Don't override SLKCFLAGS's optimisation
+sed -i 's/ -O3//' build.sh
+
+CFLAGS="$SLKCFLAGS" \
+ ./build.sh
mkdir -p $PKG/usr/sbin/
-cp -f p0f p0frep $PKG/usr/sbin/
+cp -f p0f $PKG/usr/sbin/
strip --strip-unneeded $PKG/usr/sbin/p0f
mkdir -p $PKG/etc/p0f
-for i in p0f.fp p0fa.fp p0fr.fp p0fo.fp ; do \
- cat $i > $PKG/etc/p0f/${i}.new ;
-done
-
-mkdir -p $PKG/usr/man/man1/
-cat p0f.1 | gzip -9 > $PKG/usr/man/man1/p0f.1.gz
+cat p0f.fp > $PKG/etc/p0f/p0f.fp.new
+
+if [ "${TOOLS:-no}" = "yes" ]; then
+ cd tools
+ mkdir -p $PKG/usr/bin
+ for t in p0f-sendsyn p0f-sendsyn6 p0f-client ; do
+ make $t CFLAGS="$SLKCFLAGS"
+ cp -f $t $PKG/usr/bin/
+ strip --strip-unneeded $PKG/usr/bin/$t
+ done
+ cp -a README-TOOLS $PKG/usr/doc/$PRGNAM-$VERSION
+ cd ..
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cd doc
-cp -a COPYING CREDITS ChangeLog KNOWN_BUGS README TODO \
+cd docs
+cp -a COPYING ChangeLog README TODO existential-notes.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild