blob: d0eb2768d1eb57eae5db7236f2bc933268a2fd98 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Name Service Switch module for Multicast DNS (zeroconf) name resolution"
2HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
7
8DEPENDS = "avahi"
9PR = "r7"
10
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \
12 file://0001-check-for-nss.h.patch \
13 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
15SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7"
16SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d"
17
18S = "${WORKDIR}/nss-mdns-${PV}"
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020localstatedir = "/"
21
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022inherit autotools
23
24EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi"
25
26# suppress warning, but don't bother with autonamer
27LEAD_SONAME = "libnss_mdns.so"
28DEBIANNAME_${PN} = "libnss-mdns"
29
30RDEPENDS_${PN} = "avahi-daemon"
31
32pkg_postinst_${PN} () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033 sed '
34 /^hosts:/ !b
35 /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
36 s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
37 ' -i $D${sysconfdir}/nsswitch.conf
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038}
39
40pkg_prerm_${PN} () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041 sed '
42 /^hosts:/ !b
43 s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
44 ' -i $D${sysconfdir}/nsswitch.conf
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045}