packages/net/darkstat/Makefile
ryd 3de098fdc9 add darkstat
git-svn-id: svn://svn.openwrt.org/openwrt/packages@7036 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-04-22 20:09:05 +00:00

55 lines
1.3 KiB
Makefile

#
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: $
include $(TOPDIR)/rules.mk
PKG_NAME:=darkstat
PKG_VERSION:=3.0.540
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://dmr.ath.cx/net/darkstat
PKG_MD5SUM:=498256c667b4fa79a551ac3626a2ba86
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/darkstat
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcap
TITLE:=Network bandwith monitor
DESCRIPTION:=\
A free open source utility for bandwith monitoring \
over web
URL:=http://dmr.ath.cx/net/darkstat/
endef
define Build/Compile
mkdir -p $(PKG_INSTALL_DIR)
$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
-o $(PKG_BUILD_DIR)/c-ify
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/darkstat/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/darkstat.conf $(1)/etc/config/darkstat
endef
$(eval $(call BuildPackage,darkstat))