f9ed8b03cdf7218138d3f40b82eb3767ecd6c8f6
[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.707
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:=91c70f96498dd679b21330214361e4dc
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/darkstat
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpcap +zlib
28 TITLE:=Network bandwith monitor
29 URL:=http://dmr.ath.cx/net/darkstat/
30 endef
31
32 define Package/darkstat/description
33 A free open source utility for bandwith monitoring \ over web
34 endef
35
36 define Build/Compile
37 mkdir -p $(PKG_INSTALL_DIR)
38 $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
39 -o $(PKG_BUILD_DIR)/c-ify
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 all install
43 endef
44
45 define Package/darkstat/install
46 $(INSTALL_DIR) $(1)/usr/sbin
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
48 $(INSTALL_DIR) $(1)/etc/init.d
49 $(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
50 $(INSTALL_DIR) $(1)/etc/config
51 $(INSTALL_DATA) ./files/darkstat.conf $(1)/etc/config/darkstat
52 endef
53
54 $(eval $(call BuildPackage,darkstat))