1f82f7d28ca3bb806fb186131950fc017d8cf158
[openwrt/svn-archive/archive.git] / net / iptraf / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iptraf
11 PKG_VERSION:=3.0.0
12 PKG_RELEASE:=1
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:=377371c28ee3c21a76f7024920649ea8
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/iptraf
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+libncurses
27 TITLE:=A console-based network monitoring program
28 URL:=http://iptraf.seul.org/
29 endef
30
31 define Package/iptraf/description
32 IPTraf is a console-based network statistics utility for Linux. It gathers
33 a variety of figures such as TCP connection packet and byte counts,
34 interface statistics and activity indicators, TCP/UDP traffic breakdowns,
35 and LAN station packet and byte counts.
36 endef
37
38 define Package/iptraf/postinst
39 #!/bin/sh
40 if [ -z "$${IPKG_INSTROOT}" ]; then
41 mkdir -p $${IPKG_INSTROOT}/var/log/iptraf $${IPKG_INSTROOT}/var/run/iptraf $${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 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
51 LDOPTS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
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 endef
62
63 $(eval $(call BuildPackage,iptraf))