[package] update darkstat to 3.0.712 (#5535)
[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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=darkstat
11 PKG_VERSION:=3.0.712
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:=b711f64319091d6948a05bc33a4954b3
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/darkstat
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libpcap +zlib
24 TITLE:=Network bandwith monitor
25 URL:=http://dmr.ath.cx/net/darkstat/
26 endef
27
28 define Package/darkstat/description
29 darkstat is a packet sniffer that runs as a background process on a
30 cable/DSL router, gathers all sorts of statistics about network usage,
31 and serves them over HTTP.
32 endef
33
34 define Package/darkstat/conffiles
35 /etc/config/darkstat
36 endef
37
38 CONFIGURE_ARGS += \
39 --with-chroot-dir /var/empty
40
41 define Build/Compile
42 mkdir -p $(PKG_INSTALL_DIR)
43 $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
44 -o $(PKG_BUILD_DIR)/c-ify
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
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))