libv4l: update to 1.22.1
[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:=7
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
18 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
19 PKG_LICENSE:=GPL-2.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:cipherdyne:fwknop
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/fwknop/Default
29 TITLE:=FireWall KNock OPerator
30 URL:=https://www.cipherdyne.org/fwknop/
31 endef
32
33 define Package/fwknop/Default/description
34 Fwknop implements an authorization scheme known as Single Packet Authorization
35 (SPA) for Linux systems running iptables. This mechanism requires only a
36 single encrypted and non-replayed packet to communicate various pieces of
37 information including desired access through an iptables policy. The main
38 application of this program is to use iptables in a default-drop stance to
39 protect services such as SSH with an additional layer of security in order to
40 make the exploitation of vulnerabilities (both 0-day and unpatched code) much
41 more difficult.
42 endef
43
44 define Package/fwknopd
45 $(call Package/fwknop/Default)
46 SECTION:=net
47 CATEGORY:=Network
48 SUBMENU:=Firewall
49 TITLE+= Daemon
50 DEPENDS:=+iptables +libfko +!FWKNOPD_NFQ_CAPTURE:libpcap +FWKNOPD_NFQ_CAPTURE:iptables-mod-nfqueue \
51 +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink \
52 +FWKNOP_GPG:gnupg +FWKNOP_GPG:libgpgme
53 endef
54
55 define Package/fwknopd/description
56 $(call Package/fwknop/Default/description)
57 This package contains the fwknop daemon.
58 endef
59
60 define Package/fwknopd/conffiles
61 /etc/fwknop/access.conf
62 /etc/fwknop/fwknopd.conf
63 /etc/config/fwknopd
64 endef
65
66 define Package/fwknopd/config
67 source "$(SOURCE)/Config.in"
68 endef
69
70 define Package/fwknop
71 $(call Package/fwknop/Default)
72 SECTION:=net
73 CATEGORY:=Network
74 SUBMENU:=Firewall
75 TITLE+= Client
76 DEPENDS:=+libfko +FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme
77 endef
78
79 define Package/fwknop/description
80 $(call Package/fwknop/Default/description)
81 This package contains the fwknop client.
82 endef
83
84 define Package/libfko
85 $(call Package/fwknop/Default)
86 SECTION:=libs
87 CATEGORY:=Libraries
88 SUBMENU:=Firewall
89 TITLE+= Library
90 DEPENDS:=+FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme
91 endef
92
93 define Package/libfko/description
94 $(call Package/fwknop/Default/description)
95 This package contains the libfko shared library.
96 endef
97
98
99 CONFIGURE_ARGS += \
100 --$(if $(CONFIG_FWKNOPD_NFQ_CAPTURE),en,dis)able-nfq-capture \
101 --with$(if $(CONFIG_FWKNOPD_GPG),,out)-gpgme \
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))