lldpd.mk 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ################################################################################
  2. #
  3. # lldpd
  4. #
  5. ################################################################################
  6. LLDPD_VERSION = 1.0.5
  7. LLDPD_SITE = https://media.luffy.cx/files/lldpd
  8. LLDPD_DEPENDENCIES = \
  9. $(if $(BR2_PACKAGE_CHECK),check) \
  10. host-pkgconf \
  11. $(if $(BR2_PACKAGE_LIBCAP),libcap) \
  12. libevent \
  13. $(if $(BR2_PACKAGE_VALGRIND),valgrind)
  14. LLDPD_LICENSE = ISC
  15. LLDPD_LICENSE_FILES = LICENSE
  16. # Detection of c99 support in configure fails without WCHAR. To enable
  17. # automatic detection of c99 support by configure, we need to enable
  18. # WCHAR in toolchain. But actually we do not need WCHAR at lldpd
  19. # runtime. So requesting WCHAR in toolchain just for automatic detection
  20. # will be overkill. To solve this, explicitly -specify c99 here.
  21. LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
  22. LLDPD_CONF_OPTS = \
  23. --without-embedded-libevent \
  24. --without-seccomp \
  25. --without-libbsd \
  26. --disable-hardening \
  27. --disable-privsep \
  28. $(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \
  29. $(if $(BR2_PACKAGE_LLDPD_FDP),--enable-fdp,--disable-fdp) \
  30. $(if $(BR2_PACKAGE_LLDPD_EDP),--enable-edp,--disable-edp) \
  31. $(if $(BR2_PACKAGE_LLDPD_SONMP),--enable-sonmp,--disable-sonmp) \
  32. $(if $(BR2_PACKAGE_LLDPD_LLDPMED),--enable-lldpmed,--disable-lldpmed) \
  33. $(if $(BR2_PACKAGE_LLDPD_DOT1),--enable-dot1,--disable-dot1) \
  34. $(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \
  35. $(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom)
  36. ifeq ($(BR2_PACKAGE_LIBXML2),y)
  37. LLDPD_CONF_OPTS += --with-xml
  38. LLDPD_DEPENDENCIES += libxml2
  39. else
  40. LLDPD_CONF_OPTS += --without-xml
  41. endif
  42. ifeq ($(BR2_PACKAGE_NETSNMP),y)
  43. LLDPD_CONF_OPTS += --with-snmp
  44. LLDPD_DEPENDENCIES += netsnmp
  45. LLDPD_CONF_ENV += \
  46. ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
  47. else
  48. LLDPD_CONF_OPTS += --without-snmp
  49. endif
  50. ifeq ($(BR2_PACKAGE_READLINE),y)
  51. LLDPD_CONF_OPTS += --with-readline
  52. LLDPD_DEPENDENCIES += readline
  53. else
  54. LLDPD_CONF_OPTS += --without-readline
  55. endif
  56. define LLDPD_INSTALL_INIT_SYSV
  57. $(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
  58. $(TARGET_DIR)/etc/init.d/S60lldpd
  59. endef
  60. $(eval $(autotools-package))