summaryrefslogtreecommitdiffstats
path: root/network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild')
-rw-r--r--network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild68
1 files changed, 41 insertions, 27 deletions
diff --git a/network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild b/network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild
index 3a93a44d14..636bae485c 100644
--- a/network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild
+++ b/network/arno-iptables-firewall/arno-iptables-firewall.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for arno-iptables-firewall
-# Copyright 2013-2015 Philip Lacroix <slackph at posteo dot de>
+# Copyright 2013-2020 Philip Lacroix <slackph at posteo dot de>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,15 +25,27 @@
# Thanks to Matteo Bernardini and Robby Workman for their valuable remarks
# after the first submission of this SlackBuild.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=arno-iptables-firewall
SRCNAM=aif
-VERSION=${VERSION:-2.0.1e}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-2.1.0}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+ARCH=noarch
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
-PKG=${PKG:-$TMP/package-$PRGNAM}
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
@@ -56,8 +68,8 @@ chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
PRGBIN=$PKG/usr/sbin
PRGETC=$PKG/etc/$PRGNAM
@@ -71,23 +83,25 @@ install -m 0755 -D ./configure.sh $PRGBIN/$PRGNAM-configure
install -m 0755 ./bin/arno-fwfilter $PRGBIN/
install -m 0755 ./bin/$PRGNAM $PRGBIN/
-# Patch the configuration script. We need this in order to be able to
-# run the script from outside the source directory as well. We're going
-# to (1) change from relative to absolute the paths to the environment
-# file and firewall executable; (2) rename and change the path to the
-# startup script (this is for better consistency with Slackware's init
-# system); (3) change the path to the unmodified copy of the config
-# file, needed to check for existing custom setups. We will NOT create
-# a Slackware-compliant /etc/rc.d/rc.firewall symlink to the startup
-# script, as this should be done manually by the sysadmin. We won't
-# create any SystemV-style symlinks either. (4) We will allow the script
-# to be run correctly more than once, by removing previously set values
-# if no value is entered: this is to prevent e.g. ports from remaining
-# open, or internal interfaces from remaining enabled with NAT. Finally
-# (5) we append the note, picked from the original installation script
-# and slightly enhanced, that the user will see when configuration is
-# done: this is to inform that an rc.firewall symlink has to be created
-# in order to start up the firewall at boot-time in a proper way.
+# Patch the configuration script. We need this to be able to run the
+# script from outside the source directory as well. We're going to:
+#
+# 1) Change from relative to absolute the paths to the environment file
+# and the firewall executable.
+# 2) Rename and change the path to the startup script, for consistency with
+# Slackware's init system.
+# 3) Change the path to the unmodified copy of the config file, needed to
+# check for already existing setups.
+# 4) Allow the script to be run correctly more than once, by removing
+# previously set values if no values are entered: this is to prevent,
+# for example, ports from remaining open, or NAT from remaining enabled.
+# 5) Append the note, copied from the original install script and adapted
+# to the Slackware system, that users read when configuration is done:
+# this is mainly to inform that the "rc.firewall" symlink has to be
+# manually created in order to start up the firewall at boot-time. We
+# will NOT create the symlink automatically, as this should be done by
+# the system administrator.
+
patch $PRGBIN/$PRGNAM-configure < $CWD/files/patch-configuration-script.diff
# Copy and compress man pages.
@@ -110,7 +124,7 @@ done
# expected by the configuration script for comparison purposes; create
# link to plugin as in the original script.
mkdir -p $PRGSHR
-cp -a ./share/$PRGNAM/* $PRGSHR/
+cp -a ./share/$PRGNAM/{environment,plugins} $PRGSHR/
cp -a $PRGETC/firewall.conf.new $PRGSHR/firewall.conf.orig
ln -sv /usr/share/$PRGNAM/plugins/traffic-accounting-show $PRGBIN/
@@ -134,4 +148,4 @@ 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-noarch-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE