kamailio-5.x: add snmpstats mibs files
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Feb 2018 18:08:58 +0000 (19:08 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Feb 2018 18:09:00 +0000 (19:09 +0100)
This installs the snmp mibs files provided by mod_snmpstats. A patch is
added to make the kamailio build system install the files in a proper
location in PKG_INSTALL_DIR.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/kamailio-5.x/Makefile
net/kamailio-5.x/patches/130-change-snmp-mibs-path.patch [new file with mode: 0644]

index ecfad6dac91a58e47eb6a66f2e52cd68bb17349d..391b3c10deb7ba5b5b32871263932375587f3cf0 100644 (file)
@@ -105,6 +105,11 @@ $(subst $(space),$(newline),$(foreach c,$(6),/etc/kamailio/$(c)))
 $(call Package/kamailio5/install/module,$$(1),$(1))
 $(foreach c,$(6),$(call Package/kamailio5/install/conffile,$$(1),$(c));)
 $(foreach d,$(5),$(call Package/kamailio5/install/dbfiles,$$(1),$(d));)
+  ifeq ($(1),snmpstats)
+       $(INSTALL_DIR) $$(1)/usr/share/snmp/mibs
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/* \
+                                       $$(1)/usr/share/snmp/mibs
+  endif
   endef
 $$(eval $$(call BuildPackage,kamailio5-mod-$(subst _,-,$(1))))
 endef
diff --git a/net/kamailio-5.x/patches/130-change-snmp-mibs-path.patch b/net/kamailio-5.x/patches/130-change-snmp-mibs-path.patch
new file mode 100644 (file)
index 0000000..fff2a84
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/modules/snmpstats/Makefile
++++ b/src/modules/snmpstats/Makefile
+@@ -16,7 +16,7 @@ ifeq ($(BUILDER),)
+       INSTALLMIBDIR =  $(share_prefix)/share/snmp/mibs
+ else
+       BUILDAGENTLIBS = $(shell net-snmp-config --netsnmp-agent-libs)
+-      INSTALLMIBDIR = $(basedir)$(shell net-snmp-config --prefix)/share/snmp/mibs
++      INSTALLMIBDIR = $(basedir)/usr/share/snmp/mibs
+ endif
+ ifeq ($(EMBEDDED_PERL),1)