2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.zeroflux.org
/proj
/knock
/files
/
16 PKG_MD5SUM
:=ca09d61458974cff90a700aba6120891
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/knock
/Default
26 URL
:=http
://www.zeroflux.org
/projects
/knock
30 $(call Package
/knock
/Default
)
34 define Package
/knock
/Default
/description
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.
46 define Package/knock/description
47 $(call Package/knock/Default/description)
48 This package contains the port-knocking client.
52 $(call Package/knock/Default)
56 define Package/knockd/description
57 $(call Package/knock/Default/description)
58 This package contains the port-knocking server.
61 define Package/knockd/conffiles
65 define Build/Configure
66 $(call Build/Configure/Default, \
68 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
69 ac_cv_lib_pcap_pcap_open_live=yes \
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
79 define Package/knock/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/
84 define Package/knockd/install
85 $(INSTALL_DIR) $(1)/etc
86 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/
87 $(INSTALL_DIR) $(1)/usr/sbin
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/
91 $(eval $(call BuildPackage,knock))
92 $(eval $(call BuildPackage,knockd))