Makefile (1602B)
1 # 2 # Copyright (C) 2007-2016 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.719 12 PKG_RELEASE:=1 13 14 PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info> 15 16 PKG_LICENSE:=GPL-2.0 BSD-ISC 17 PKG_LICENSE_FILES:=COPYING.GPL LICENSE 18 19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 20 PKG_SOURCE_URL:=http://unix4lyfe.org/darkstat 21 PKG_MD5SUM:=963145de05cb21f4d93a9c244beeaea0 22 23 PKG_INSTALL:=1 24 25 include $(INCLUDE_DIR)/package.mk 26 27 define Package/darkstat 28 SECTION:=net 29 CATEGORY:=Network 30 DEPENDS:=+libpcap +zlib 31 TITLE:=Network bandwidth monitor 32 URL:=http://unix4lyfe.org/darkstat/ 33 endef 34 35 define Package/darkstat/description 36 darkstat is a packet sniffer that runs as a background process on a cable/DSL 37 router, gathers all sorts of statistics about network usage, and serves them 38 over HTTP. 39 endef 40 41 define Package/darkstat/conffiles 42 /etc/config/darkstat 43 endef 44 45 CONFIGURE_ARGS += \ 46 --disable-debug \ 47 --with-chroot-dir=/var/empty 48 49 TARGET_CFLAGS += -std=gnu99 50 51 define Build/Compile 52 $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \ 53 -o $(PKG_BUILD_DIR)/c-ify 54 $(call Build/Compile/Default) 55 endef 56 57 define Package/darkstat/install 58 $(INSTALL_DIR) $(1)/usr/sbin 59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/ 60 $(INSTALL_DIR) $(1)/etc/init.d 61 $(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat 62 $(INSTALL_DIR) $(1)/etc/config 63 $(INSTALL_CONF) ./files/darkstat.config $(1)/etc/config/darkstat 64 endef 65 66 $(eval $(call BuildPackage,darkstat))