Port netstat-nat to -ng
[openwrt/svn-archive/archive.git] / net / netstat-nat / 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:=netstat-nat
12 PKG_VERSION:=1.4.6
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=ccf71a6cbd9a513ea3adec54b54ee770
15
16 PKG_SOURCE_URL:=http://tweegy.demon.nl/download/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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/netstat-nat
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=A netstat variant for NAT connections
29 DESCRIPTION:=Netstat-nat is a small program written in C.\\\
30 It displays NAT connections, managed by netfilter/iptables which comes\\\
31 with the > 2.4.x linux kernels.\\\
32 The program reads its information from '/proc/net/ip_conntrack', which\\\
33 is the temporary conntrack-storage of netfilter.\\\
34 URL:=http://tweegy.demon.nl/projects/netstat-nat/
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default)
39 endef
40
41 define Build/Compile
42 rm -rf $(PKG_INSTALL_DIR)
43 mkdir -p $(PKG_INSTALL_DIR)
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 $(TARGET_CONFIGURE_OPTS) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Package/netstat-nat/install
51 install -d -m0755 $(1)/usr/bin
52 $(CP) $(PKG_INSTALL_DIR)/usr/bin/netstat-nat $(1)/usr/bin/
53 endef
54
55 $(eval $(call BuildPackage,netstat-nat))