2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-06-04 22:45:47 +02:00
|
|
|
#
|
|
|
|
# netsnmp
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-06-04 22:45:47 +02:00
|
|
|
|
2014-12-09 20:48:33 +01:00
|
|
|
NETSNMP_VERSION = 5.7.3
|
2012-08-26 01:52:48 +02:00
|
|
|
NETSNMP_SITE = http://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION)
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
|
2012-05-17 19:33:20 +02:00
|
|
|
NETSNMP_LICENSE = Various BSD-like
|
|
|
|
NETSNMP_LICENSE_FILES = COPYING
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_INSTALL_STAGING = YES
|
|
|
|
NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes
|
2014-12-24 08:54:24 +01:00
|
|
|
NETSNMP_CONF_OPTS = \
|
|
|
|
--with-persistent-directory=/var/lib/snmp \
|
|
|
|
--with-defaults \
|
|
|
|
--enable-mini-agent \
|
|
|
|
--without-rpm \
|
|
|
|
--with-logfile=none \
|
|
|
|
--without-kmem-usage $(DISABLE_IPV6) \
|
|
|
|
--enable-as-needed \
|
|
|
|
--without-perl-modules \
|
|
|
|
--disable-embedded-perl \
|
|
|
|
--disable-perl-cc-checks \
|
|
|
|
--disable-scripts \
|
|
|
|
--with-default-snmp-version="1" \
|
|
|
|
--enable-silent-libtool \
|
|
|
|
--enable-mfd-rewrites \
|
|
|
|
--with-sys-contact="root@localhost" \
|
|
|
|
--with-sys-location="Unknown" \
|
|
|
|
--with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \
|
|
|
|
--with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \
|
|
|
|
--with-out-transports="Unix" \
|
|
|
|
--disable-manuals
|
2014-09-27 21:32:41 +02:00
|
|
|
NETSNMP_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIB_LDCONFIG_CMD=true install
|
2014-09-27 21:32:40 +02:00
|
|
|
NETSNMP_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIB_LDCONFIG_CMD=true install
|
2012-05-27 21:10:42 +02:00
|
|
|
NETSNMP_MAKE = $(MAKE1)
|
2013-05-10 08:29:33 +02:00
|
|
|
NETSNMP_CONFIG_SCRIPTS = net-snmp-config
|
|
|
|
|
2010-11-02 20:34:14 +01:00
|
|
|
NETSNMP_BLOAT_MIBS = BRIDGE DISMAN-EVENT DISMAN-SCHEDULE DISMAN-SCRIPT EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX
|
2003-06-04 22:45:47 +02:00
|
|
|
|
2007-04-20 13:12:50 +02:00
|
|
|
ifeq ($(BR2_ENDIAN),"BIG")
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += --with-endianness=big
|
2007-04-20 13:12:50 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += --with-endianness=little
|
2008-11-04 12:26:52 +01:00
|
|
|
endif
|
|
|
|
|
2010-07-20 20:30:07 +02:00
|
|
|
# OpenSSL
|
2008-11-04 12:26:52 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2010-07-29 14:15:17 +02:00
|
|
|
NETSNMP_DEPENDENCIES += openssl
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += \
|
2010-07-20 20:30:07 +02:00
|
|
|
--with-openssl=$(STAGING_DIR)/usr/include/openssl
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2014-02-15 09:18:35 +01:00
|
|
|
# openssl uses zlib, so we need to explicitly link with it when static
|
|
|
|
NETSNMP_CONF_ENV += LIBS=-lz
|
|
|
|
endif
|
2008-11-04 12:26:52 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += --without-openssl
|
2008-11-04 12:26:52 +01:00
|
|
|
endif
|
|
|
|
|
2011-08-31 21:46:39 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += --disable-mib-loading
|
|
|
|
NETSNMP_CONF_OPTS += --disable-mibs
|
2011-08-31 21:46:39 +02:00
|
|
|
endif
|
|
|
|
|
2014-05-16 22:28:38 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
NETSNMP_CONF_OPTS += --disable-debugging
|
2014-05-16 22:28:38 +02:00
|
|
|
endif
|
|
|
|
|
2010-11-02 20:34:14 +01:00
|
|
|
# Remove IPv6 MIBs if there's no IPv6
|
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
|
define NETSNMP_REMOVE_MIBS_IPV6
|
|
|
|
rm -f $(TARGET_DIR)/usr/share/snmp/mibs/IPV6*
|
|
|
|
endef
|
2014-05-14 06:51:12 +02:00
|
|
|
|
|
|
|
NETSNMP_POST_INSTALL_TARGET_HOOKS += NETSNMP_REMOVE_MIBS_IPV6
|
2010-11-02 20:34:14 +01:00
|
|
|
endif
|
|
|
|
|
2014-05-14 06:51:12 +02:00
|
|
|
define NETSNMP_REMOVE_BLOAT_MIBS
|
2010-11-02 20:34:14 +01:00
|
|
|
for mib in $(NETSNMP_BLOAT_MIBS); do \
|
|
|
|
rm -f $(TARGET_DIR)/usr/share/snmp/mibs/$$mib-MIB.txt; \
|
|
|
|
done
|
2014-05-14 06:51:12 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
NETSNMP_POST_INSTALL_TARGET_HOOKS += NETSNMP_REMOVE_BLOAT_MIBS
|
|
|
|
|
|
|
|
define NETSNMP_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S59snmpd
|
2010-07-20 20:30:07 +02:00
|
|
|
endef
|
|
|
|
|
2011-05-02 17:36:05 +02:00
|
|
|
define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
|
2013-05-10 08:29:33 +02:00
|
|
|
$(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
|
2011-05-02 17:36:05 +02:00
|
|
|
-e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
|
|
|
|
$(STAGING_DIR)/usr/bin/net-snmp-config
|
|
|
|
endef
|
|
|
|
|
|
|
|
NETSNMP_POST_INSTALL_STAGING_HOOKS += NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|