aboutsummaryrefslogtreecommitdiff
path: root/network/dnstop/dnstop.SlackBuild
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-11 20:01:31 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-11 20:01:31 +0200
commit270a3d6ee526f5ba415493abbdc23aa87ac16585 (patch)
tree4e19876940dca92cae47f1bbedf0de717861eeae /network/dnstop/dnstop.SlackBuild
parentc5b8f0a5d9694132063cc3ea5a407a2fe65ba10c (diff)
network/dnstop: Added to 12.0 repository
Diffstat (limited to 'network/dnstop/dnstop.SlackBuild')
-rw-r--r--network/dnstop/dnstop.SlackBuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/network/dnstop/dnstop.SlackBuild b/network/dnstop/dnstop.SlackBuild
new file mode 100644
index 0000000000000..4172220e2cad1
--- /dev/null
+++ b/network/dnstop/dnstop.SlackBuild
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# Slackware build script for dnstop
+# Written by Menno Duursma <druiloor@zonnet.nl>
+
+# Exit on most errors
+set -e
+
+PRGNAM=dnstop
+VERSION=20070510
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+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 {} \;
+
+# Create destdirs
+mkdir -p $PKG/usr/bin
+mkdir -p $PKG/usr/man/man8
+
+# Set the destdir and enable PPP support
+mv Makefile Makefile.std
+cat Makefile.std \
+ | sed -e s#/usr/local#$PKG/usr# \
+ -e 's/DUSE_PPP=0/DUSE_PPP=1/' > Makefile
+
+make
+make install
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z][A-Z]* $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.tgz