mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-02 13:04:42 +01:00
network/fwknop: Added (Single Packet Authorization / Port Knocking)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
parent
915d5559e0
commit
1ecf929173
5 changed files with 154 additions and 0 deletions
5
network/fwknop/README
Normal file
5
network/fwknop/README
Normal file
|
@ -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.
|
15
network/fwknop/doinst.sh
Normal file
15
network/fwknop/doinst.sh
Normal file
|
@ -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
|
105
network/fwknop/fwknop.SlackBuild
Normal file
105
network/fwknop/fwknop.SlackBuild
Normal file
|
@ -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}
|
10
network/fwknop/fwknop.info
Normal file
10
network/fwknop/fwknop.info
Normal file
|
@ -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"
|
19
network/fwknop/slack-desc
Normal file
19
network/fwknop/slack-desc
Normal file
|
@ -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:
|
Loading…
Reference in a new issue