summaryrefslogtreecommitdiff
path: root/network/fwknop
diff options
context:
space:
mode:
Diffstat (limited to 'network/fwknop')
-rw-r--r--network/fwknop/README5
-rw-r--r--network/fwknop/doinst.sh15
-rw-r--r--network/fwknop/fwknop.SlackBuild105
-rw-r--r--network/fwknop/fwknop.info10
-rw-r--r--network/fwknop/slack-desc19
5 files changed, 154 insertions, 0 deletions
diff --git a/network/fwknop/README b/network/fwknop/README
new file mode 100644
index 0000000000..b0bd5ff4ba
--- /dev/null
+++ b/network/fwknop/README
@@ -0,0 +1,5 @@
+fwknop implements an authorization scheme known as Single Packet
+Authorization (SPA) for Linux systems running iptables.
+
+This optionally uses gpg and libgpgme if they are available. Using
+gpg with fwknop is highly recommended.
diff --git a/network/fwknop/doinst.sh b/network/fwknop/doinst.sh
new file mode 100644
index 0000000000..55373d8ee2
--- /dev/null
+++ b/network/fwknop/doinst.sh
@@ -0,0 +1,15 @@
+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/fwknop/access.conf.new
+config etc/fwknop/fwknopd.conf.new
diff --git a/network/fwknop/fwknop.SlackBuild b/network/fwknop/fwknop.SlackBuild
new file mode 100644
index 0000000000..81595deb5d
--- /dev/null
+++ b/network/fwknop/fwknop.SlackBuild
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+# Slackware build script for fwknop
+#
+# Based on http://slackbuilds.org/templates/autotools-template.SlackBuild
+#
+# Copyright (c) 2011, Eric B. Pratt <eric.b.pratt@gmail.com>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+PRGNAM=fwknop
+VERSION=${VERSION:-2.0.0rc2}
+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 -e
+
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-static=no \
+ --docdir=/usr/doc/$PRGNAM-$VERSION
+
+make
+make install-strip DESTDIR=$PKG
+
+#rename config files to .new
+for f in access.conf fwknopd.conf; do
+ mv $PKG/etc/$PRGNAM/$f $PKG/etc/$PRGNAM/$f.new
+done
+
+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
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*.info*
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog NEWS README \
+ $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}
diff --git a/network/fwknop/fwknop.info b/network/fwknop/fwknop.info
new file mode 100644
index 0000000000..1b7b5df4ab
--- /dev/null
+++ b/network/fwknop/fwknop.info
@@ -0,0 +1,10 @@
+PRGNAM="fwknop"
+VERSION="2.0.0rc2"
+HOMEPAGE="http://www.cipherdyne.org/fwknop/"
+DOWNLOAD="http://www.cipherdyne.org/fwknop/download/fwknop-2.0.0rc2.tar.gz"
+MD5SUM="c78252216fa9627cacf61b453da915a8"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Eric B. Pratt"
+EMAIL="eric.b.pratt@gmail.com"
+APPROVED="Niels Horn"
diff --git a/network/fwknop/slack-desc b/network/fwknop/slack-desc
new file mode 100644
index 0000000000..6bc893ccb0
--- /dev/null
+++ b/network/fwknop/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+fwknop: fwknop (Single Packet Authorization and Port Knocking)
+fwknop:
+fwknop: fwknop implements an authorization scheme known as Single Packet
+fwknop: Authorization (SPA) for Linux systems running iptables.
+fwknop:
+fwknop:
+fwknop:
+fwknop:
+fwknop:
+fwknop: Home: http://www.cipherdyne.org/fwknop/
+fwknop: