Add vnstati (#4311)
[openwrt/svn-archive/archive.git] / net / darkstat / Makefile
1 #
2 # Copyright (C) 2007 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:=darkstat
12 PKG_VERSION:=3.0.708
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://dmr.ath.cx/net/darkstat
17 PKG_MD5SUM:=21fe231f6ec84be082e9d41747dd0fc9
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/darkstat
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+libpcap +zlib
25 TITLE:=Network bandwith monitor
26 URL:=http://dmr.ath.cx/net/darkstat/
27 endef
28
29 define Package/darkstat/description
30 darkstat is a packet sniffer that runs as a background process on a
31 cable/DSL router, gathers all sorts of statistics about network usage,
32 and serves them over HTTP.
33 endef
34
35 CONFIGURE_ARGS += \
36 --with-chroot-dir /var/empty
37
38 define Build/Compile
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
41 -o $(PKG_BUILD_DIR)/c-ify
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Package/darkstat/install
48 $(INSTALL_DIR) $(1)/usr/sbin
49 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
50 $(INSTALL_DIR) $(1)/etc/init.d
51 $(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
52 $(INSTALL_DIR) $(1)/etc/config
53 $(INSTALL_DATA) ./files/darkstat.conf $(1)/etc/config/darkstat
54 endef
55
56 $(eval $(call BuildPackage,darkstat))