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-03-10 18:13:02 +01:00
|
|
|
NETSNMP_VERSION = 5.7.2.1
|
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
|
2013-11-18 16:02:18 +01:00
|
|
|
NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp \
|
2010-07-20 20:30:07 +02:00
|
|
|
--with-defaults --enable-mini-agent --without-rpm \
|
|
|
|
--with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \
|
2012-03-15 22:04:27 +01:00
|
|
|
--enable-as-needed --without-perl-modules \
|
2010-07-20 20:30:07 +02:00
|
|
|
--disable-embedded-perl --disable-perl-cc-checks \
|
2010-11-02 20:34:14 +01:00
|
|
|
--disable-scripts --with-default-snmp-version="1" \
|
|
|
|
--enable-silent-libtool --enable-mfd-rewrites \
|
|
|
|
--with-sys-contact="root@localhost" \
|
2010-07-20 20:30:07 +02:00
|
|
|
--with-sys-location="Unknown" \
|
2013-01-29 17:14:44 +01:00
|
|
|
--with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \
|
|
|
|
--with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \
|
2014-02-05 14:50:56 +01:00
|
|
|
--with-out-transports="Unix" \
|
|
|
|
--disable-manuals
|
2014-05-14 06:51:12 +02:00
|
|
|
NETSNMP_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LIB_LDCONFIG_CMD=true install
|
|
|
|
NETSNMP_INSTALL_TARGET_OPT = 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")
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_CONF_OPT += --with-endianness=big
|
2007-04-20 13:12:50 +02:00
|
|
|
else
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_CONF_OPT += --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
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_CONF_OPT += \
|
|
|
|
--with-openssl=$(STAGING_DIR)/usr/include/openssl
|
2014-02-15 09:18:35 +01:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
# 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
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_CONF_OPT += --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)
|
|
|
|
NETSNMP_CONF_OPT += --disable-mib-loading
|
|
|
|
NETSNMP_CONF_OPT += --disable-mibs
|
|
|
|
endif
|
|
|
|
|
2014-05-16 22:28:38 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
|
|
|
|
NETSNMP_CONF_OPT += --disable-debugging
|
|
|
|
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))
|