From d3ebba27fdc994783004a35ffa7e3f9f49108950 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 11 Feb 2018 19:08:58 +0100 Subject: [PATCH] kamailio-5.x: add snmpstats mibs files 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 --- net/kamailio-5.x/Makefile | 5 +++++ .../patches/130-change-snmp-mibs-path.patch | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 net/kamailio-5.x/patches/130-change-snmp-mibs-path.patch diff --git a/net/kamailio-5.x/Makefile b/net/kamailio-5.x/Makefile index ecfad6d..391b3c1 100644 --- a/net/kamailio-5.x/Makefile +++ b/net/kamailio-5.x/Makefile @@ -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 index 0000000..fff2a84 --- /dev/null +++ b/net/kamailio-5.x/patches/130-change-snmp-mibs-path.patch @@ -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) -- 2.30.2