|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=nlbwmon
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://github.com/jow-/nlbwmon.git
|
|
PKG_SOURCE_DATE:=2017-08-02
|
|
PKG_SOURCE_VERSION:=32fc0925cbc30a4a8f71392e976aa94b586c4086
|
|
PKG_MIRROR_HASH:=caedb66cf6dcbdcee0d1525923e203d003ef15f34a13a328686794666f16171f
|
|
|
|
CMAKE_INSTALL:=1
|
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
|
PKG_LICENSE:=ISC
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
|
|
|
define Package/nlbwmon
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
DEPENDS:=+libubox +libnl-tiny +zlib +kmod-nf-conntrack-netlink
|
|
TITLE:=LEDE Traffic Usage Monitor
|
|
endef
|
|
|
|
define Package/nlbwmon/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nlbwmon $(1)/usr/sbin/nlbwmon
|
|
$(LN) nlbwmon $(1)/usr/sbin/nlbw
|
|
$(INSTALL_DIR) $(1)/usr/share/nlbwmon
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/protocols.txt $(1)/usr/share/nlbwmon/protocols
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/nlbwmon.init $(1)/etc/init.d/nlbwmon
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./files/nlbwmon.config $(1)/etc/config/nlbwmon
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,nlbwmon))
|