[packages] quagga-unstable: Enable OSPF6, ISIS and RIPng daemons
[openwrt/svn-archive/archive.git] / net / knock / Makefile
index e3d6b8e1028893d739ae2f6c84df00457dba0abe..4d871863ceeead9bcd2dab90570d21d36e1296af 100644 (file)
@@ -4,7 +4,6 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
@@ -13,12 +12,8 @@ PKG_VERSION:=0.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.zeroflux.org/knock/files/
+PKG_SOURCE_URL:=http://www.zeroflux.org/proj/knock/files/
 PKG_MD5SUM:=ca09d61458974cff90a700aba6120891
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -27,33 +22,39 @@ define Package/knock/Default
   CATEGORY:=Network
   DEPENDS:=+libpcap
   TITLE:=Port-knocking
-  DESCRIPTION:=\
-       It listens to all traffic on an ethernet (or PPP) interface, \\\
-       looking for special "knock" sequences of port-hits. A client \\\
-       makes these port-hits by sending a TCP (or UDP) packet to a \\\
-       port on the server. This port need not be open -- since \\\
-       knockd listens at the link-layer level, it sees all traffic \\\
-       even if it's destined for a closed port. When the server \\\
-       detects a specific sequence of port-hits, it runs a command \\\
-       defined in its configuration file. This can be used to open \\\
-       up holes in a firewall for quick access.
-  URL:=http://www.zeroflux.org/cgi-bin/cvstrac/knock/wiki
+  URL:=http://www.zeroflux.org/projects/knock
 endef
 
 define Package/knock
   $(call Package/knock/Default)
-  TITLE+= client
-  DESCRIPTION+=\\\
-       \\\
-       This package contains the port-knocking client.
+  TITLE+= (client)
+endef
+
+define Package/knock/Default/description
+       It listens to all traffic on an ethernet (or PPP) interface,
+       looking for special "knock" sequences of port-hits. A client
+       makes these port-hits by sending a TCP (or UDP) packet to a
+       port on the server. This port need not be open -- since
+       knockd listens at the link-layer level, it sees all traffic
+       even if it's destined for a closed port. When the server
+       detects a specific sequence of port-hits, it runs a command
+       defined in its configuration file. This can be used to open
+       up holes in a firewall for quick access.
+endef
+
+define Package/knock/description
+  $(call Package/knock/Default/description)
+  This package contains the port-knocking client.
 endef
 
 define Package/knockd
   $(call Package/knock/Default)
-  TITLE+= server
-  DESCRIPTION+=\\\
-       \\\
-       This package contains the port-knocking server.
+  TITLE+= (server)
+endef
+
+define Package/knockd/description
+  $(call Package/knock/Default/description)
+  This package contains the port-knocking server.
 endef
 
 define Package/knockd/conffiles
@@ -75,15 +76,15 @@ define Build/Compile
 endef
        
 define Package/knock/install   
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/
 endef
 
-define Package/kockd/install
-       install -d -m0755 $(1)/etc
-       install -m0600 $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/
+define Package/knockd/install
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,knock))