add quotes to TARGET_CC and TARGET_CROSS to help with distcc and ccache (yet again)
[openwrt/svn-archive/archive.git] / net / iftop / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iftop
11 PKG_VERSION:=0.17
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=062bc8fb3856580319857326e0b8752d
14
15 PKG_SOURCE_URL:=http://www.ex-parrot.com/~pdw/iftop/download
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/iftop
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpcap +libncurses +libpthread
28 TITLE:=display bandwith usage on an interface
29 DESCRIPTION:=iftop does for network usage what top(1) does for CPU usage. It\\\
30 listens to network traffic on a named interface and displays a\\\
31 table of current bandwidth usage by pairs of hosts. Handy for\\\
32 answering the question "why is our ADSL link so slow?".\\\
33 URL:=http://www.ex-parrot.com/~pdw/iftop/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default)
38 endef
39
40 define Build/Compile
41 rm -rf $(PKG_INSTALL_DIR)
42 mkdir -p $(PKG_INSTALL_DIR)
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 CC="$(TARGET_CC)" \
45 DESTDIR="$(PKG_INSTALL_DIR)" \
46 install
47 endef
48
49 define Package/iftop/install
50 install -d -m0755 $(1)/usr/bin
51 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/bin/
52 endef
53
54 $(eval $(call BuildPackage,iftop))