2003-06-04 22:45:47 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# netsnmp
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2011-09-02 16:04:49 +02:00
|
|
|
NETSNMP_VERSION = 5.6.1.1
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
|
|
|
|
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
|
|
|
|
NETSNMP_INSTALL_STAGING = YES
|
|
|
|
NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes
|
|
|
|
NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --disable-static \
|
|
|
|
--with-defaults --enable-mini-agent --without-rpm \
|
|
|
|
--with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \
|
|
|
|
--enable-as-needed --disable-debugging --without-perl-modules \
|
|
|
|
--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" \
|
2010-11-02 20:34:14 +01:00
|
|
|
--with-mib-modules="host ucd-snmp/dlmod" \
|
|
|
|
--with-out-mib-modules="disman/event disman/schedule utilities" \
|
|
|
|
--with-out-transports="Unix"
|
|
|
|
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
|
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
|
|
|
|
|
2010-07-20 20:30:07 +02:00
|
|
|
# Docs
|
2010-04-10 22:47:05 +02:00
|
|
|
ifneq ($(BR2_HAVE_DOCUMENTATION),y)
|
2010-07-20 20:30:07 +02:00
|
|
|
NETSNMP_CONF_OPT += --disable-manuals
|
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
|
|
|
|
|
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
|
|
|
|
endif
|
|
|
|
|
2010-07-20 20:30:07 +02:00
|
|
|
define NETSNMP_INSTALL_TARGET_CMDS
|
2010-11-02 20:34:14 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
2010-07-20 20:30:07 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) install
|
|
|
|
$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S59snmpd
|
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
|
|
|
|
$(NETSNMP_REMOVE_MIBS_IPV6)
|
2010-07-20 20:30:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define NETSNMP_UNINSTALL_TARGET_CMDS
|
2010-11-02 20:34:14 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
2010-07-20 20:30:07 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) uninstall
|
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S59snmpd
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
|
|
|
|
endef
|
|
|
|
|
2011-05-02 17:36:05 +02:00
|
|
|
define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
|
|
|
|
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
|
|
|
|
-e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
|
|
|
|
-e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
|
|
|
|
-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
|
|
|
|
|
2011-09-29 21:57:43 +02:00
|
|
|
$(eval $(call AUTOTARGETS))
|