c19cca0452
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>
121 lines
3.4 KiB
Makefile
121 lines
3.4 KiB
Makefile
################################################################################
|
|
#
|
|
# iputils
|
|
#
|
|
################################################################################
|
|
|
|
IPUTILS_VERSION = 20240117
|
|
IPUTILS_SITE = https://github.com/iputils/iputils/releases/download/$(IPUTILS_VERSION)
|
|
IPUTILS_LICENSE = GPL-2.0+, BSD-3-Clause
|
|
IPUTILS_LICENSE_FILES = LICENSE Documentation/LICENSE.BSD3 Documentation/LICENSE.GPL2
|
|
IPUTILS_CPE_ID_VALID = YES
|
|
IPUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
|
|
|
# Selectively build binaries
|
|
IPUTILS_CONF_OPTS += \
|
|
-DBUILD_CLOCKDIFF=$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),true,false) \
|
|
-DBUILD_TRACEPATH=$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),true,false) \
|
|
-DSKIP_TESTS=true
|
|
|
|
# Selectively select the appropriate SELinux refpolicy modules
|
|
IPUTILS_SELINUX_MODULES = \
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),netutils) \
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),netutils) \
|
|
$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),netutils)
|
|
|
|
#
|
|
# arping
|
|
#
|
|
ifeq ($(BR2_PACKAGE_IPUTILS_ARPING),y)
|
|
IPUTILS_CONF_OPTS += -DBUILD_ARPING=true
|
|
|
|
# move some binaries to the same location as where Busybox installs
|
|
# the corresponding applets, so that we have a single version of the
|
|
# tools (from iputils)
|
|
define IPUTILS_MOVE_ARPING_BINARY
|
|
mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping
|
|
endef
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_ARPING_BINARY
|
|
|
|
else
|
|
IPUTILS_CONF_OPTS += -DBUILD_ARPING=false
|
|
endif
|
|
|
|
#
|
|
# ping
|
|
#
|
|
ifeq ($(BR2_PACKAGE_IPUTILS_PING),y)
|
|
IPUTILS_CONF_OPTS += -DBUILD_PING=true
|
|
|
|
# same reason to move the ping binary as for arping
|
|
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
|
define IPUTILS_MOVE_PING_BINARY
|
|
mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping
|
|
endef
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_PING_BINARY
|
|
endif
|
|
|
|
# upstream requires distros to create symlink
|
|
define IPUTILS_CREATE_PING6_SYMLINK
|
|
ln -sf ping $(TARGET_DIR)/bin/ping6
|
|
endef
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_CREATE_PING6_SYMLINK
|
|
|
|
else
|
|
IPUTILS_CONF_OPTS += -DBUILD_PING=false
|
|
endif
|
|
|
|
# Handle libraries
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
IPUTILS_CONF_OPTS += -DUSE_CAP=true
|
|
IPUTILS_DEPENDENCIES += libcap
|
|
else
|
|
IPUTILS_CONF_OPTS += -DUSE_CAP=false
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
|
IPUTILS_CONF_OPTS += -DUSE_IDN=true
|
|
IPUTILS_DEPENDENCIES += libidn2
|
|
else
|
|
IPUTILS_CONF_OPTS += -DUSE_IDN=false
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
IPUTILS_DEPENDENCIES += systemd
|
|
endif
|
|
|
|
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
|
|
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=true
|
|
else
|
|
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=false
|
|
endif
|
|
|
|
# XSL Stylesheets for DocBook 5 not packaged for buildroot
|
|
IPUTILS_CONF_OPTS += -DBUILD_MANS=false -DBUILD_HTML_MANS=false
|
|
|
|
# handle permissions ourselves
|
|
IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true
|
|
ifeq ($(BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES),y)
|
|
define IPUTILS_PERMISSIONS
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
|
|
/usr/sbin/arping f 755 0 0 - - - - -,)
|
|
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
|
|
/usr/bin/clockdiff f 755 0 0 - - - - -
|
|
|xattr cap_net_raw+p,)
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),\
|
|
/bin/ping f 755 0 0 - - - - -
|
|
|xattr cap_net_raw+p,)
|
|
endef
|
|
else
|
|
define IPUTILS_PERMISSIONS
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
|
|
/usr/sbin/arping f 755 0 0 - - - - -,)
|
|
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
|
|
/usr/bin/clockdiff f 4755 0 0 - - - - -,)
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),\
|
|
/bin/ping f 4755 0 0 - - - - -,)
|
|
endef
|
|
endif
|
|
|
|
$(eval $(meson-package))
|