ifstat: make dependency on libnetsnmp conditional
authorChristophe Lermytte <redacted>
Fri, 8 May 2020 11:42:30 +0000 (13:42 +0200)
committerChristophe Lermytte <redacted>
Wed, 13 May 2020 08:46:00 +0000 (10:46 +0200)
The upstream package supports it with a configure switch.
Defaulting to 'with SNMP support' as it was before.

Signed-off-by: Christophe Lermytte <redacted>
net/ifstat/Config.in [new file with mode: 0644]
net/ifstat/Makefile

diff --git a/net/ifstat/Config.in b/net/ifstat/Config.in
new file mode 100644 (file)
index 0000000..a224a81
--- /dev/null
@@ -0,0 +1,4 @@
+        config IFSTAT_SNMP
+                depends on PACKAGE_ifstat
+                bool "Build with support for SNMP"
+                default y
index 8b4d1ec6ff397727dd5e6ae1af7cda5bdb6cfabf..8ab3053473f698eb410bb9929efed16cfd199a61 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ifstat
 PKG_VERSION:=1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://gael.roualland.free.fr/ifstat/
@@ -26,7 +26,7 @@ define Package/ifstat
   CATEGORY:=Network
   TITLE:=InterFace STATistics Monitoring
   URL:=http://gael.roualland.free.fr/ifstat/
-  DEPENDS:=+libnetsnmp
+  DEPENDS:=+IFSTAT_SNMP:libnetsnmp
 endef
 
 define Package/ifstat/description
@@ -36,6 +36,12 @@ define Package/ifstat/description
        interfaces using SNMP.
 endef
 
+define Package/ifstat/config
+       source "$(SOURCE)/Config.in"
+endef
+
+CONFIGURE_ARGS += --with$(if $(CONFIG_IFSTAT_SNMP),,out)-snmp
+
 define Package/ifstat/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifstat $(1)/usr/bin/
git clone https://git.99rst.org/PROJECT