netsnmp.mk 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #############################################################
  2. #
  3. # netsnmp
  4. #
  5. #############################################################
  6. NETSNMP_VERSION = 5.5
  7. NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
  8. NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
  9. NETSNMP_INSTALL_STAGING = YES
  10. NETSNMP_LIBTOOL_PATCH = NO
  11. NETSNMP_MAKE = $(MAKE1)
  12. NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes
  13. NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --disable-static \
  14. --with-defaults --enable-mini-agent --without-rpm \
  15. --with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \
  16. --enable-as-needed --disable-debugging --without-perl-modules \
  17. --disable-embedded-perl --disable-perl-cc-checks \
  18. --with-sys-contact="root@unknown" \
  19. --with-sys-location="Unknown" \
  20. --with-mib-modules="host smux ucd-snmp/dlmod"
  21. ifeq ($(BR2_ENDIAN),"BIG")
  22. NETSNMP_CONF_OPT += --with-endianness=big
  23. else
  24. NETSNMP_CONF_OPT += --with-endianness=little
  25. endif
  26. # OpenSSL
  27. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  28. NETSNMP_DEPENDENCIES += openssl
  29. NETSNMP_CONF_OPT += \
  30. --with-openssl=$(STAGING_DIR)/usr/include/openssl
  31. else
  32. NETSNMP_CONF_OPT += --without-openssl
  33. endif
  34. # Docs
  35. ifneq ($(BR2_HAVE_DOCUMENTATION),y)
  36. NETSNMP_CONF_OPT += --disable-manuals
  37. endif
  38. define NETSNMP_INSTALL_TARGET_CMDS
  39. $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) \
  40. DESTDIR=$(TARGET_DIR) install
  41. $(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
  42. $(TARGET_DIR)/etc/init.d/S59snmpd
  43. endef
  44. define NETSNMP_UNINSTALL_TARGET_CMDS
  45. $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) \
  46. DESTDIR=$(TARGET_DIR) uninstall
  47. rm -f $(TARGET_DIR)/etc/init.d/S59snmpd
  48. rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
  49. endef
  50. $(eval $(call AUTOTARGETS,package,netsnmp))