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