iptraf - Modify Makefile to include the rvnamed binary
[openwrt/svn-archive/archive.git] / net / iptraf / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iptraf
11 PKG_VERSION:=3.0.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://iptraf.seul.org/pub/iptraf/ \
16 ftp://the.wiretapped.net/pub/security/network-monitoring/iptraf/
17 PKG_MD5SUM:=004c2c005a1b78739e22bc49d33e244d
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/iptraf
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+libncurses
25 TITLE:=A console-based network monitoring program
26 URL:=http://iptraf.seul.org/
27 endef
28
29 define Package/iptraf/description
30 IPTraf is a console-based network statistics utility for Linux. It gathers a
31 variety of figures such as TCP connection packet and byte counts, interface
32 statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
33 station packet and byte counts.
34 endef
35
36 define Package/iptraf/postinst
37 #!/bin/sh
38 if [ -z "$${IPKG_INSTROOT}" ]; then
39 mkdir -p $${IPKG_INSTROOT}/var/log/iptraf \
40 $${IPKG_INSTROOT}/var/run/iptraf \
41 $${IPKG_INSTROOT}/var/lib/iptraf
42 fi
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR)/src \
47 $(TARGET_CONFIGURE_OPTS) \
48 CFLAGS="$(TARGET_CFLAGS)" \
49 DEBUG="" \
50 INCLUDEDIR="-I../support $(TARGET_CPPFLAGS)" \
51 LDOPTS="$(TARGET_LDFLAGS)" \
52 PLATFORM="-DPLATFORM=\\\"Linux/$(ARCH)\\\"" \
53 TARGET="/usr/bin" \
54 WORKDIR="/var/lib/iptraf" \
55 all
56 endef
57
58 define Package/iptraf/install
59 $(INSTALL_DIR) $(1)/usr/bin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iptraf $(1)/usr/bin/
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rvnamed $(1)/usr/bin/
62 endef
63
64 $(eval $(call BuildPackage,iptraf))