summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2018-05-01 21:10:42 +0000
committerkhorben <khorben@pkgsrc.org>2018-05-01 21:10:42 +0000
commita684ca88a6201d3562aa9ce8909850f89c3168e5 (patch)
tree269eb53d1b837ff4df94a7ecb88ab032a8f8e1f7 /net
parentd16dc484efd453b293b44da0d4a81336ec2c71e0 (diff)
downloadpkgsrc-a684ca88a6201d3562aa9ce8909850f89c3168e5.tar.gz
Import net/fwknop version 2.6.9 from wip
fwknop stands for the "FireWall KNock OPerator", and implements an authorization scheme called Single Packet Authorization (SPA). This method of authorization is based around a default-drop packet filter (fwknop supports iptables and firewalld on Linux, ipfw on FreeBSD and Mac OS X, and PF on OpenBSD) and libpcap. SPA is essentially next generation port knocking.
Diffstat (limited to 'net')
-rw-r--r--net/fwknop/DESCR5
-rw-r--r--net/fwknop/Makefile40
-rw-r--r--net/fwknop/PLIST11
-rw-r--r--net/fwknop/distinfo8
-rw-r--r--net/fwknop/patches/patch-common_netinet__common.h15
-rw-r--r--net/fwknop/patches/patch-configure.ac16
6 files changed, 95 insertions, 0 deletions
diff --git a/net/fwknop/DESCR b/net/fwknop/DESCR
new file mode 100644
index 00000000000..48ebb6dde3b
--- /dev/null
+++ b/net/fwknop/DESCR
@@ -0,0 +1,5 @@
+fwknop stands for the "FireWall KNock OPerator", and implements an authorization
+scheme called Single Packet Authorization (SPA). This method of authorization is
+based around a default-drop packet filter (fwknop supports iptables and
+firewalld on Linux, ipfw on FreeBSD and Mac OS X, and PF on OpenBSD) and
+libpcap. SPA is essentially next generation port knocking.
diff --git a/net/fwknop/Makefile b/net/fwknop/Makefile
new file mode 100644
index 00000000000..73ce2f72dd5
--- /dev/null
+++ b/net/fwknop/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1 2018/05/01 21:10:42 khorben Exp $
+
+DISTNAME= fwknop-2.6.9
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=mrash/}
+
+MAINTAINER= khorben@defora.org
+HOMEPAGE= https://github.com/mrash/fwknop/
+COMMENT= Port knocking via Single Packet Authorization (SPA)
+LICENSE= gnu-gpl-v2
+
+DEPENDS+= gnupg-[0-9]*:../../security/gnupg
+DEPENDS+= wget-[0-9]*:../../net/wget
+
+USE_TOOLS+= aclocal autoconf automake autoheader makeinfo
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+=--infodir=${PREFIX}/${PKGINFODIR}
+
+EGDIR= ${PREFIX}/share/examples/fwknop
+CONF_FILES+= ${EGDIR}/access.conf \
+ ${PKG_SYSCONFDIR}/fwknop/access.conf
+CONF_FILES+= ${EGDIR}/fwknopd.conf \
+ ${PKG_SYSCONFDIR}/fwknop/fwknopd.conf
+INSTALLATION_DIRS+= ${EGDIR}
+
+INFO_FILES= yes
+
+WRKSRC= ${WRKDIR}/fwknop-2.6.9
+
+pre-configure:
+ cd ${WRKSRC} && sh autogen.sh
+
+post-install:
+ ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/fwknop/access.conf ${DESTDIR}${EGDIR}/
+ ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/fwknop/fwknopd.conf ${DESTDIR}${EGDIR}/
+
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../security/gpgme/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/fwknop/PLIST b/net/fwknop/PLIST
new file mode 100644
index 00000000000..45532d34057
--- /dev/null
+++ b/net/fwknop/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1 2018/05/01 21:10:42 khorben Exp $
+bin/fwknop
+include/fko.h
+info/libfko.info
+lib/libfko.la
+man/man8/fwknop.8
+man/man8/fwknopd.8
+sbin/fwknopd
+share/examples/fwknop/access.conf
+share/examples/fwknop/fwknopd.conf
+@pkgdir etc/fwknop
diff --git a/net/fwknop/distinfo b/net/fwknop/distinfo
new file mode 100644
index 00000000000..907982b368b
--- /dev/null
+++ b/net/fwknop/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2018/05/01 21:10:42 khorben Exp $
+
+SHA1 (fwknop-2.6.9.tar.gz) = d306c206bc0afd26cad3567584d5017348ebc13e
+RMD160 (fwknop-2.6.9.tar.gz) = 6409bc7fa4880070502e3c92ff60bf3aa3968b3f
+SHA512 (fwknop-2.6.9.tar.gz) = 4706560d44c911c8604059d88dded9c1b8c333399d90ec7dc366c0fba96c79680bdbf1b8b5e76cc34aaf3a1e58fff80db8f5f20c96d57481bdb476a9b99f4d1b
+Size (fwknop-2.6.9.tar.gz) = 3043542 bytes
+SHA1 (patch-common_netinet__common.h) = 14aba8c993916b6ce4bd035326e1b74735333c8b
+SHA1 (patch-configure.ac) = a17c487cb4f294f3800b5557ccb8124c64c679c4
diff --git a/net/fwknop/patches/patch-common_netinet__common.h b/net/fwknop/patches/patch-common_netinet__common.h
new file mode 100644
index 00000000000..4f24f311d95
--- /dev/null
+++ b/net/fwknop/patches/patch-common_netinet__common.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-common_netinet__common.h,v 1.1 2018/05/01 21:10:42 khorben Exp $
+
+Add support for NetBSD.
+
+--- common/netinet_common.h.orig 2016-06-09 01:01:53.000000000 +0000
++++ common/netinet_common.h
+@@ -45,7 +45,7 @@
+ #if HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+- #if PLATFORM_OPENBSD /* OpenBSD hack due to autoconf net/if.h difficulties */
++ #if PLATFORM_NETBSD || PLATFORM_OPENBSD /* for autoconf net/if.h difficulties */
+ #include <net/if.h>
+ #include <net/ethertypes.h>
+ #include <netinet/if_ether.h>
diff --git a/net/fwknop/patches/patch-configure.ac b/net/fwknop/patches/patch-configure.ac
new file mode 100644
index 00000000000..81021dee26a
--- /dev/null
+++ b/net/fwknop/patches/patch-configure.ac
@@ -0,0 +1,16 @@
+$NetBSD: patch-configure.ac,v 1.1 2018/05/01 21:10:42 khorben Exp $
+
+Add support for NetBSD.
+
+--- configure.ac.orig 2016-06-09 01:01:53.000000000 +0000
++++ configure.ac
+@@ -412,6 +412,9 @@ use_mingw=no
+ case "$host" in
+ *-*-linux*)
+ ;;
++*-*-netbsd*)
++ AC_DEFINE_UNQUOTED([PLATFORM_NETBSD], [1], [Define if you are running on NetBSD])
++ ;;
+ *-*-openbsd*)
+ AC_DEFINE_UNQUOTED([PLATFORM_OPENBSD], [1], [Define if you are running on OpenBSD])
+ ;;