aboutsummaryrefslogtreecommitdiff
path: root/network/ipset/ipset.SlackBuild
diff options
context:
space:
mode:
authorMichal Bialozor <bialyy@o2.pl>2011-09-02 08:20:04 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-02 08:20:04 -0300
commit52815a09ea1bc0dd8f54629230935c71c06df1c9 (patch)
tree04d0d34168533b926986ab09c04ff17fc6daf852 /network/ipset/ipset.SlackBuild
parentee45fabaff7cd3c24e049488c1bb14e8db5b4fb7 (diff)
network/ipset: Added (administration tool for IP sets)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/ipset/ipset.SlackBuild')
-rw-r--r--network/ipset/ipset.SlackBuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/network/ipset/ipset.SlackBuild b/network/ipset/ipset.SlackBuild
new file mode 100644
index 000000000000..f4e4fda601b4
--- /dev/null
+++ b/network/ipset/ipset.SlackBuild
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# Slackware build script for ipset
+# Written by Michal Bialozor <bialyy@o2.pl>
+
+PRGNAM=ipset
+VERSION=4.5
+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 -ue
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+#Fix prefix and libdir
+sed \
+ -e "/^PREFIX/s|/usr/local|/usr|" \
+ -e "/^LIBDIR/s|/lib|/lib$LIBDIRSUFFIX|" \
+ -i Makefile
+
+make
+make binaries_install DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/lib/modules/$(uname -r)/extra/ipset
+cp -a kernel/{ip_set*.ko,ipt_SET.ko,ipt_set.ko} \
+ $PKG/lib/modules/$(uname -r)/extra/ipset
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING ChangeLog ChangeLog.ippool README TODO \
+ $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}