First Commit
[librecmc/package-feed.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:=2
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_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:=http://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 +libpcap +FWKNOP_GPG:gnupg
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 /etc/config/fwknopd
57 endef
58
59 define Package/fwknopd/config
60         source "$(SOURCE)/Config.in"
61 endef
62
63 define Package/fwknop
64   $(call Package/fwknop/Default)
65   SECTION:=net
66   CATEGORY:=Network
67   SUBMENU:=Firewall
68   TITLE+= Client
69   DEPENDS:=+libfko
70 endef
71
72 define Package/fwknop/description
73   $(call Package/fwknop/Default/description)
74   This package contains the fwknop client.
75 endef
76
77 define Package/libfko
78   $(call Package/fwknop/Default)
79   SECTION:=libs
80   CATEGORY:=Libraries
81   SUBMENU:=Firewall
82   TITLE+= Library
83 endef
84
85 define Package/libfko/description
86   $(call Package/fwknop/Default/description)
87   This package contains the libfko shared library.
88 endef
89
90
91 ifneq ($(CONFIG_FWKNOPD_GPG),y)
92         CONFIGURE_ARGS += --without-gpgme 
93 endif
94
95 CONFIGURE_ARGS += \
96         --with-iptables=/usr/sbin/iptables
97
98 define Build/InstallDev
99         $(INSTALL_DIR) $(1)/usr/include
100         $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
101         $(INSTALL_DIR) $(1)/usr/lib
102         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
103 endef
104
105 define Package/fwknopd/install
106         $(INSTALL_DIR) $(1)/etc/config
107         $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
108         $(INSTALL_DIR) $(1)/etc/fwknop
109         $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
110                 $(1)/etc/fwknop/
111         $(INSTALL_DIR) $(1)/etc/init.d
112         $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
113         $(INSTALL_DIR) $(1)/usr/sbin
114         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
115 endef
116
117 define Package/fwknop/install
118         $(INSTALL_DIR) $(1)/usr/bin
119         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
120 endef
121
122 define Package/libfko/install
123         $(INSTALL_DIR) $(1)/usr/lib
124         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
125 endef
126
127 $(eval $(call BuildPackage,fwknopd))
128 $(eval $(call BuildPackage,fwknop))
129 $(eval $(call BuildPackage,libfko))