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