kumquat-buildroot/package/nss-mdns/nss-mdns.mk
Peter Korsgaard 27d22993ba nss-mdns: do not unconditionally override hosts: line in nsswitch.conf
Instead, add mdns4_minimal / mdns4 around the dns entry if missing.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-10-21 01:50:35 +02:00

21 lines
630 B
Makefile

################################################################################
#
# nss-mdns
#
################################################################################
NSS_MDNS_VERSION = 0.10
NSS_MDNS_SITE = http://0pointer.de/lennart/projects/nss-mdns
NSS_MDNS_LICENSE = LGPL-2.1+
NSS_MDNS_LICENSE_FILES = LICENSE
# add mdns4_minimal / mdns around the dns provider if missing
define NSS_MDNS_INSTALL_CONFIG
$(SED) '/^hosts:/ {/mdns4/! s/dns/mdns4_minimal [NOTFOUND=return] dns mdns4/}' \
$(TARGET_DIR)/etc/nsswitch.conf
endef
NSS_MDNS_TARGET_FINALIZE_HOOKS += NSS_MDNS_INSTALL_CONFIG
$(eval $(autotools-package))