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