blob: 5e4460045b94893cfd6d048f7c1f1480ea3a58c3 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Name Service Switch module for Multicast DNS (zeroconf) name resolution"
2HOMEPAGE = "https://github.com/lathiat/nss-mdns"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
7
8DEPENDS = "avahi"
9
10SRC_URI = "git://github.com/lathiat/nss-mdns \
11 "
12
13SRCREV = "41c9c5e78f287ed4b41ac438c1873fa71bfa70ae"
14
15S = "${WORKDIR}/git"
16
17inherit autotools pkgconfig
18
19COMPATIBLE_HOST_libc-musl = 'null'
20
21EXTRA_OECONF = "--libdir=${base_libdir}"
22
23RDEPENDS_${PN} = "avahi-daemon"
24
25pkg_postinst_${PN} () {
26 sed '
27 /^hosts:/ !b
28 /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
29 s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
30 ' -i $D${sysconfdir}/nsswitch.conf
31}
32
33pkg_prerm_${PN} () {
34 sed '
35 /^hosts:/ !b
36 s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
37 ' -i $D${sysconfdir}/nsswitch.conf
38}