branch Attitude Adjustment packages
[12.09/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.0
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:=96de4c5a4ae75a8618ef80269c6a70ad
17
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   MAINTAINER:=Jonathan Bennett <jbscience87@gmail.com>
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 +libpcap
46 endef
47
48 define Package/fwknopd/description
49   $(call Package/fwknop/Default/description)
50   This package contains the fwknop daemon.
51 endef
52
53 define Package/fwknopd/conffiles
54 /etc/fwknop/access.conf
55 /etc/fwknop/fwknopd.conf
56 endef
57
58 define Package/fwknop
59   $(call Package/fwknop/Default)
60   SECTION:=net
61   CATEGORY:=Network
62   SUBMENU:=Firewall
63   TITLE+= Client
64   DEPENDS:=+libfko
65 endef
66
67 define Package/fwknop/description
68   $(call Package/fwknop/Default/description)
69   This package contains the fwknop client.
70 endef
71
72 define Package/libfko
73   $(call Package/fwknop/Default)
74   SECTION:=libs
75   CATEGORY:=Libraries
76   SUBMENU:=Firewall
77   TITLE+= Library
78 endef
79
80 define Package/libfko/description
81   $(call Package/fwknop/Default/description)
82   This package contains the libfko shared library.
83 endef
84
85 CONFIGURE_ARGS += \
86         --without-gpgme \
87         --with-iptables=/usr/sbin/iptables
88
89 define Build/InstallDev
90         $(INSTALL_DIR) $(1)/usr/include
91         $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
92         $(INSTALL_DIR) $(1)/usr/lib
93         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
94 endef
95
96 define Package/fwknopd/install
97         $(INSTALL_DIR) $(1)/etc/fwknop
98         $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
99                 $(1)/etc/fwknop/
100         $(INSTALL_DIR) $(1)/etc/init.d
101         $(INSTALL_BIN) $(PKG_BUILD_DIR)/extras/fwknop.init.openwrt \
102                 $(1)/etc/init.d/fwknopd
103         $(INSTALL_DIR) $(1)/usr/sbin
104         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
105 endef
106
107 define Package/fwknop/install
108         $(INSTALL_DIR) $(1)/usr/bin
109         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
110 endef
111
112 define Package/libfko/install
113         $(INSTALL_DIR) $(1)/usr/lib
114         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
115 endef
116
117 $(eval $(call BuildPackage,fwknopd))
118 $(eval $(call BuildPackage,fwknop))
119 $(eval $(call BuildPackage,libfko))