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