[packages] lcd4linux: only build routerboard driver on rb532
[openwrt/svn-archive/archive.git] / net / knock / Makefile
1 #
2 # Copyright (C) 2006 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:=knock
11 PKG_VERSION:=0.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.zeroflux.org/knock/files/
16 PKG_MD5SUM:=ca09d61458974cff90a700aba6120891
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/knock/Default
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libpcap
24 TITLE:=Port-knocking
25 URL:=http://www.zeroflux.org/cgi-bin/cvstrac/knock/wiki
26 endef
27
28 define Package/knock
29 $(call Package/knock/Default)
30 TITLE+= client
31 endef
32
33 define Package/knock/description
34 =
35 It listens to all traffic on an ethernet (or PPP) interface,
36 looking for special "knock" sequences of port-hits. A client
37 makes these port-hits by sending a TCP (or UDP) packet to a
38 port on the server. This port need not be open -- since
39 knockd listens at the link-layer level, it sees all traffic
40 even if it's destined for a closed port. When the server
41 detects a specific sequence of port-hits, it runs a command
42 defined in its configuration file. This can be used to open
43 up holes in a firewall for quick access.
44 This package contains the port-knocking client.
45 endef
46
47 define Package/knockd
48 $(call Package/knock/Default)
49 TITLE+= server
50 endef
51
52 define Package/knockd/description
53 =
54 It listens to all traffic on an ethernet (or PPP) interface,
55 looking for special "knock" sequences of port-hits. A client
56 makes these port-hits by sending a TCP (or UDP) packet to a
57 port on the server. This port need not be open -- since
58 knockd listens at the link-layer level, it sees all traffic
59 even if it's destined for a closed port. When the server
60 detects a specific sequence of port-hits, it runs a command
61 defined in its configuration file. This can be used to open
62 up holes in a firewall for quick access.
63 This package contains the port-knocking server.
64 endef
65
66 define Package/knockd/conffiles
67 /etc/knockd.conf
68 endef
69
70 define Build/Configure
71 $(call Build/Configure/Default, \
72 , \
73 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
74 ac_cv_lib_pcap_pcap_open_live=yes \
75 )
76 endef
77
78 define Build/Compile
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
81 all install
82 endef
83
84 define Package/knock/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/
87 endef
88
89 define Package/knockd/install
90 $(INSTALL_DIR) $(1)/etc
91 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/
94 endef
95
96 $(eval $(call BuildPackage,knock))
97 $(eval $(call BuildPackage,knockd))