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.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.zeroflux.org
/knock
/files
/
17 PKG_MD5SUM
:=ca09d61458974cff90a700aba6120891
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/knock
/Default
31 It listens to
all traffic on an ethernet
(or PPP
) interface
, \\\
32 looking for special
"knock" sequences of port-hits. A client
\\\
33 makes these port-hits by sending a TCP
(or UDP
) packet to a
\\\
34 port on the server. This port need not be open
-- since
\\\
35 knockd listens at the link-layer level
, it sees
all traffic
\\\
36 even if it
's destined for a closed port. When the server \\\
37 detects a specific sequence of port-hits, it runs a command \\\
38 defined in its configuration file. This can be used to open \\\
39 up holes in a firewall for quick access.
40 URL:=http://www.zeroflux.org/cgi-bin/cvstrac/knock/wiki
44 $(call Package/knock/Default)
48 This package contains the port-knocking client.
52 $(call Package/knock/Default)
56 This package contains the port-knocking server.
59 define Package/knockd/conffiles
63 define Build/Configure
64 $(call Build/Configure/Default, \
66 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
67 ac_cv_lib_pcap_pcap_open_live=yes \
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
77 define Package/knock/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(CP) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/
82 define Package/knockd/install
83 $(INSTALL_DIR) $(1)/etc
84 install -m0600 $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/
85 $(INSTALL_DIR) $(1)/usr/sbin
86 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/
89 $(eval $(call BuildPackage,knock))
90 $(eval $(call BuildPackage,knockd))