Files
packages/net/darkstat/Makefile
Jean-Michel Lacroix 8643915bbd darkstat: [18.06] procd init script and enabling additional parameters
This is the same change as the one on master
This is to change the init script to a procd init script
This also enable some additional parameters in the binary that
were present but not enabled:
The export file (option export_file)
The import file (option import_file)
The daylog (option daylog_file)
These are disabled by default.  Also, the option to run as a daemon
is removed, as not compatible with procd.

There is no change in the binary.

Signed-off-by: Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
2018-11-26 18:12:14 -05:00

65 lines
1.6 KiB
Makefile

#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=darkstat
PKG_VERSION:=3.0.719
PKG_RELEASE:=2
PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
PKG_LICENSE:=GPL-2.0 BSD-ISC
PKG_LICENSE_FILES:=COPYING.GPL LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://unix4lyfe.org/darkstat
PKG_HASH:=aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/darkstat
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcap +zlib +USE_GLIBC:libbsd
TITLE:=Network bandwidth monitor
URL:=http://unix4lyfe.org/darkstat/
endef
define Package/darkstat/description
darkstat is a packet sniffer that runs as a background process on a cable/DSL
router, gathers all sorts of statistics about network usage, and serves them
over HTTP.
endef
define Package/darkstat/conffiles
/etc/config/darkstat
endef
CONFIGURE_ARGS += \
--disable-debug \
--with-chroot-dir=/var/empty
TARGET_CFLAGS += -std=gnu99
define Build/Compile
$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
-o $(PKG_BUILD_DIR)/c-ify
$(call Build/Compile/Default)
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_CONF) ./files/darkstat.config $(1)/etc/config/darkstat
endef
$(eval $(call BuildPackage,darkstat))