Skip to content

Commit

Permalink
openwisp-monitoring: allow not depending on rpcd-mod-iwinfo
Browse files Browse the repository at this point in the history
Add option to exclude rpcd-mod-iwinfo from dependency.

Signed-off-by: Gagan Deep <[email protected]>
  • Loading branch information
pandafy authored and feckert committed Nov 11, 2024
1 parent 886b3fa commit ca503cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions admin/openwisp-monitoring/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
menu "netjson-monitoring Configuration"

config NETJSON_MONITORING_IWINFO
bool "Enable rpcd-mod-iwinfo"
default y
help
Whether to include the rpcd-mod-iwinfo dependency (enabled by default).

endmenu
14 changes: 12 additions & 2 deletions admin/openwisp-monitoring/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=openwisp-monitoring
PKG_VERSION:=0.2.0
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Federico Capoano <[email protected]>
PKG_LICENSE:=GPL-3.0-or-later
Expand Down Expand Up @@ -34,10 +34,15 @@ define Package/netjson-monitoring
CATEGORY:=Administration
SECTION:=admin
SUBMENU:=openwisp
DEPENDS:=+libubus-lua +lua-cjson +rpcd +rpcd-mod-iwinfo
DEPENDS:=+libubus-lua +lua-cjson +rpcd
DEPENDS+=+NETJSON_MONITORING_IWINFO:rpcd-mod-iwinfo
URL:=http://openwisp.org
endef

define Package/netjson-monitoring/config
source "$(SOURCE)/Config.in"
endef

define Build/Compile
endef

Expand Down Expand Up @@ -88,6 +93,11 @@ define Package/netjson-monitoring/install
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/wifi.lua \
$(1)/usr/lib/lua/openwisp-monitoring/wifi.lua

# Iwinfo is enabled by default unless specified otherwise
ifeq ($(CONFIG_NETJSON_MONITORING_IWINFO), y)
$(CP) $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/iwinfo.lua $(1)/usr/lib/lua/openwisp-monitoring/iwinfo.lua
endif

$(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-monitoring/

endef
Expand Down

0 comments on commit ca503cc

Please sign in to comment.