-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (40 loc) · 1.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
include $(TOPDIR)/rules.mk
PKG_NAME:=nlbwmon
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/a7ypically/nlbwmon.git
PKG_SOURCE_DATE:=2023-09-23
PKG_SOURCE_VERSION:=f722b54d0287a3ac5e8f9563e6324325cc25f752
PKG_MIRROR_HASH:=58807078d83b3bf5a6c96e9e9d40db3103ed6c4bd7439817091d152871e591be
CMAKE_INSTALL:=1
PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS += -DLIBNL_LIBRARY_TINY=ON
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 +libustream-wolfssl +libuci +libubus
TITLE:=OpenWrt 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
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/nlbwmon.hotplug $(1)/etc/hotplug.d/iface/30-nlbwmon
endef
define Package/nlbwmon/conffiles
/etc/config/nlbwmon
/usr/share/nlbwmon/protocols
endef
$(eval $(call BuildPackage,nlbwmon))