kumquat-buildroot/package/lldpd/lldpd.mk
Yann E. MORIN c19cca0452 package: switch to _CPE_ID_VALID
Now that we document _CPE_ID_VALID, and that it shall be used instead of
setting a default value to one of the other _CPE_ID_* variables, change
all of the existing packages to use it, to avoid any error when we later
extend check-package to validate the sanity ofthe _CPE_ID_* variables.

Mechanical change done within the reference container, running the new
check in check-package, to report the CPE_ID errors:

    $ make check-package 2>/dev/null \
    |awk '{
            split($(1), a, ":"); fname = a[1]
            split($(2), a, "'\''"); val = a[2]
            new_var = $(8); gsub("_CPE_ID_.*", "_CPE_ID_VALID", new_var)
            printf("%s %s %s %s\n", fname, $(8), val, new_var)
    }' \
    |while read fname var val new_var; do
        sed -r -i -e "s/${var}[[:space:]]*=[[:space:]]*${val}/${new_var} = YES/" "${fname}"
    done

    $ git diff -I'CPE_ID_(VENDOR|VALID)'
    [empty]

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:30:06 +01:00

70 lines
2.1 KiB
Makefile

################################################################################
#
# lldpd
#
################################################################################
LLDPD_VERSION = 1.0.17
LLDPD_SITE = https://media.luffy.cx/files/lldpd
LLDPD_DEPENDENCIES = \
$(if $(BR2_PACKAGE_CHECK),check) \
host-pkgconf \
$(if $(BR2_PACKAGE_LIBCAP),libcap) \
libevent \
$(if $(BR2_PACKAGE_VALGRIND),valgrind)
LLDPD_LICENSE = ISC
LLDPD_LICENSE_FILES = LICENSE
LLDPD_CPE_ID_VALID = YES
# Detection of c99 support in configure fails without WCHAR. To enable
# automatic detection of c99 support by configure, we need to enable
# WCHAR in toolchain. But actually we do not need WCHAR at lldpd
# runtime. So requesting WCHAR in toolchain just for automatic detection
# will be overkill. To solve this, explicitly -specify c99 here.
LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
LLDPD_CONF_OPTS = \
--without-embedded-libevent \
--without-seccomp \
--without-libbsd \
--disable-hardening \
--disable-privsep \
$(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \
$(if $(BR2_PACKAGE_LLDPD_FDP),--enable-fdp,--disable-fdp) \
$(if $(BR2_PACKAGE_LLDPD_EDP),--enable-edp,--disable-edp) \
$(if $(BR2_PACKAGE_LLDPD_SONMP),--enable-sonmp,--disable-sonmp) \
$(if $(BR2_PACKAGE_LLDPD_LLDPMED),--enable-lldpmed,--disable-lldpmed) \
$(if $(BR2_PACKAGE_LLDPD_DOT1),--enable-dot1,--disable-dot1) \
$(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \
$(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom)
ifeq ($(BR2_PACKAGE_LIBXML2),y)
LLDPD_CONF_OPTS += --with-xml
LLDPD_DEPENDENCIES += libxml2
else
LLDPD_CONF_OPTS += --without-xml
endif
ifeq ($(BR2_PACKAGE_NETSNMP),y)
LLDPD_CONF_OPTS += --with-snmp
LLDPD_DEPENDENCIES += netsnmp
LLDPD_CONF_ENV += \
ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
else
LLDPD_CONF_OPTS += --without-snmp
endif
ifeq ($(BR2_PACKAGE_READLINE),y)
LLDPD_CONF_OPTS += --with-readline
LLDPD_DEPENDENCIES += readline
else
LLDPD_CONF_OPTS += --without-readline
endif
define LLDPD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
$(TARGET_DIR)/etc/init.d/S60lldpd
endef
$(eval $(autotools-package))