aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Roe <duncan_roe@acslink.net.au>2014-06-30 09:26:14 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-06-30 20:10:20 +0700
commit28e7241c8c0c960f0d9077ee2808e7fa4e8417f3 (patch)
treeb84dc2a3dc70c04baf224b57e74ab34b6cb06515
parent5fad1838a4edc9ffae9e6ea2e68a4c4e2b87180f (diff)
network/nft: Updated for version 0.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/nft/doinst.sh21
-rw-r--r--network/nft/nft.SlackBuild12
-rw-r--r--network/nft/nft.info6
3 files changed, 35 insertions, 4 deletions
diff --git a/network/nft/doinst.sh b/network/nft/doinst.sh
new file mode 100644
index 0000000000000..606a6d8d2079b
--- /dev/null
+++ b/network/nft/doinst.sh
@@ -0,0 +1,21 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/nftables/bridge-filter.new
+config etc/nftables/ipv4-filter.new
+config etc/nftables/ipv4-mangle.new
+config etc/nftables/ipv6-nat.new
+config etc/nftables/ipv6-mangle.new
+config etc/nftables/ipv4-nat.new
+config etc/nftables/ipv6-filter.new
+config etc/nftables/inet-filter.new
diff --git a/network/nft/nft.SlackBuild b/network/nft/nft.SlackBuild
index 106310f7a4337..3a012f0469d8c 100644
--- a/network/nft/nft.SlackBuild
+++ b/network/nft/nft.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=nft
PKGNAM=nftables
-VERSION=${VERSION:-0.2}
+VERSION=${VERSION:-0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -92,6 +92,15 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
+mv $PKG/etc/nftables/bridge-filter $PKG/etc/nftables/bridge-filter.new
+mv $PKG/etc/nftables/ipv4-filter $PKG/etc/nftables/ipv4-filter.new
+mv $PKG/etc/nftables/ipv4-mangle $PKG/etc/nftables/ipv4-mangle.new
+mv $PKG/etc/nftables/ipv6-nat $PKG/etc/nftables/ipv6-nat.new
+mv $PKG/etc/nftables/ipv6-mangle $PKG/etc/nftables/ipv6-mangle.new
+mv $PKG/etc/nftables/ipv4-nat $PKG/etc/nftables/ipv4-nat.new
+mv $PKG/etc/nftables/ipv6-filter $PKG/etc/nftables/ipv6-filter.new
+mv $PKG/etc/nftables/inet-filter $PKG/etc/nftables/inet-filter.new
+
DOCSDIR=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $DOCSDIR
cp -a $DOCUMENTATION $DOCSDIR
@@ -99,6 +108,7 @@ cat $CWD/$PRGNAM.SlackBuild > $DOCSDIR/$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}
diff --git a/network/nft/nft.info b/network/nft/nft.info
index adec6e161e354..82e3b3e754810 100644
--- a/network/nft/nft.info
+++ b/network/nft/nft.info
@@ -1,8 +1,8 @@
PRGNAM="nft"
-VERSION="0.2"
+VERSION="0.3"
HOMEPAGE="http://www.netfilter.org/projects/nftables/"
-DOWNLOAD="http://www.netfilter.org/projects/nftables/files/nftables-0.2.tar.bz2"
-MD5SUM="9b824060febe56ed5e2fbd7f43ea78d4"
+DOWNLOAD="http://www.netfilter.org/projects/nftables/files/nftables-0.3.tar.bz2"
+MD5SUM="244e449ee80bbbf2b2908d861b074c7f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libnftnl"