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
|
2015-02-17 16:42:11 +01:00
|
|
|
NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=no
|
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 \
|
2015-04-19 14:40:00 +02:00
|
|
|
--without-kmem-usage \
|
2014-12-24 08:54:24 +01:00
|
|
|
--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")
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --with-endianness=big
|
2007-04-20 13:12:50 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_DEPENDENCIES += openssl
|
|
|
|
NETSNMP_CONF_OPTS += \
|
2015-12-09 19:30:23 +01:00
|
|
|
--with-openssl=$(STAGING_DIR)/usr/include/openssl \
|
|
|
|
--with-security-modules="tsm,usm" \
|
|
|
|
--with-transports="DTLSUDP,TLSTCP"
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
# openssl uses zlib, so we need to explicitly link with it when static
|
|
|
|
NETSNMP_CONF_ENV += LIBS=-lz
|
2014-02-15 09:18:35 +01:00
|
|
|
endif
|
2015-02-17 16:43:17 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --with-openssl=internal
|
2008-11-04 12:26:52 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --without-openssl
|
2008-11-04 12:26:52 +01:00
|
|
|
endif
|
|
|
|
|
2015-12-15 18:20:18 +01:00
|
|
|
# There's no option to forcibly enable or disable it
|
|
|
|
ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
|
|
|
NETSNMP_DEPENDENCIES += pciutils
|
|
|
|
endif
|
|
|
|
|
2016-04-18 16:43:10 +02:00
|
|
|
# For ucd-snmp/lmsensorsMib
|
|
|
|
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
|
|
|
|
NETSNMP_DEPENDENCIES += lm-sensors
|
|
|
|
endif
|
|
|
|
|
2011-08-31 21:46:39 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
|
2015-03-31 09:21:57 +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)
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --disable-debugging
|
2014-05-16 22:28:38 +02:00
|
|
|
endif
|
|
|
|
|
2015-02-17 16:42:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --enable-agent
|
2015-02-17 16:42:39 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --disable-agent
|
2015-02-17 16:42:39 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSNMP_CLIENTS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --enable-applications
|
2015-02-17 16:42:39 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
NETSNMP_CONF_OPTS += --disable-applications
|
2015-02-17 16:42:39 +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
|
|
|
|
|
2015-02-17 16:42:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
|
2014-05-14 06:51:12 +02:00
|
|
|
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
|
2015-02-17 16:42:39 +01:00
|
|
|
endif
|
2010-07-20 20:30:07 +02:00
|
|
|
|
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))
|