noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / net / fwknop / Makefile
1 #
2 # Copyright (C) 2011-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=fwknop
11 PKG_VERSION:=2.6.9
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
16 PKG_MD5SUM:=e2c49e9674888a028bd443a55c3aaa22
17 PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
18 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
19 PKG_LICENSE:=GPLv2
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/fwknop/Default
25 TITLE:=FireWall KNock OPerator
26 URL:=http://www.cipherdyne.org/fwknop/
27 endef
28
29 define Package/fwknop/Default/description
30 Fwknop implements an authorization scheme known as Single Packet Authorization
31 (SPA) for Linux systems running iptables. This mechanism requires only a
32 single encrypted and non-replayed packet to communicate various pieces of
33 information including desired access through an iptables policy. The main
34 application of this program is to use iptables in a default-drop stance to
35 protect services such as SSH with an additional layer of security in order to
36 make the exploitation of vulnerabilities (both 0-day and unpatched code) much
37 more difficult.
38 endef
39
40 define Package/fwknopd
41 $(call Package/fwknop/Default)
42 SECTION:=net
43 CATEGORY:=Network
44 SUBMENU:=Firewall
45 TITLE+= Daemon
46 DEPENDS:=+iptables +libfko +!FWKNOPD_NFQ_CAPTURE:libpcap +FWKNOPD_NFQ_CAPTURE:iptables-mod-nfqueue +FWKNOP_GPG:gnupg \
47 +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink
48 endef
49
50 define Package/fwknopd/description
51 $(call Package/fwknop/Default/description)
52 This package contains the fwknop daemon.
53 endef
54
55 define Package/fwknopd/conffiles
56 /etc/fwknop/access.conf
57 /etc/fwknop/fwknopd.conf
58 /etc/config/fwknopd
59 endef
60
61 define Package/fwknopd/config
62 source "$(SOURCE)/Config.in"
63 endef
64
65 define Package/fwknop
66 $(call Package/fwknop/Default)
67 SECTION:=net
68 CATEGORY:=Network
69 SUBMENU:=Firewall
70 TITLE+= Client
71 DEPENDS:=+libfko
72 endef
73
74 define Package/fwknop/description
75 $(call Package/fwknop/Default/description)
76 This package contains the fwknop client.
77 endef
78
79 define Package/libfko
80 $(call Package/fwknop/Default)
81 SECTION:=libs
82 CATEGORY:=Libraries
83 SUBMENU:=Firewall
84 TITLE+= Library
85 endef
86
87 define Package/libfko/description
88 $(call Package/fwknop/Default/description)
89 This package contains the libfko shared library.
90 endef
91
92
93 ifneq ($(CONFIG_FWKNOPD_GPG),y)
94 CONFIGURE_ARGS += --without-gpgme
95 endif
96
97 ifeq ($(CONFIG_FWKNOPD_NFQ_CAPTURE),y)
98 CONFIGURE_ARGS += --enable-nfq-capture
99 endif
100
101 CONFIGURE_ARGS += \
102 --with-iptables=/usr/sbin/iptables
103
104 define Build/InstallDev
105 $(INSTALL_DIR) $(1)/usr/include
106 $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
107 $(INSTALL_DIR) $(1)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
109 endef
110
111 define Package/fwknopd/install
112 $(INSTALL_DIR) $(1)/etc/config
113 $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
114 $(INSTALL_DIR) $(1)/etc/fwknop
115 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
116 $(1)/etc/fwknop/
117 $(INSTALL_DIR) $(1)/etc/init.d
118 $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
119 $(INSTALL_DIR) $(1)/usr/sbin
120 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
121 endef
122
123 define Package/fwknop/install
124 $(INSTALL_DIR) $(1)/usr/bin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
126 endef
127
128 define Package/libfko/install
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
131 endef
132
133 $(eval $(call BuildPackage,fwknopd))
134 $(eval $(call BuildPackage,fwknop))
135 $(eval $(call BuildPackage,libfko))