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