Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Name Service Switch module for Multicast DNS (zeroconf) name resolution" |
| 2 | HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/" |
| 3 | SECTION = "libs" |
| 4 | |
| 5 | LICENSE = "LGPLv2.1+" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" |
| 7 | |
| 8 | DEPENDS = "avahi" |
| 9 | PR = "r7" |
| 10 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 11 | SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
| 14 | SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7" |
| 15 | SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d" |
| 16 | |
| 17 | S = "${WORKDIR}/nss-mdns-${PV}" |
| 18 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | localstatedir = "/" |
| 20 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | inherit autotools |
| 22 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 23 | COMPATIBLE_HOST_libc-musl = 'null' |
| 24 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi" |
| 26 | |
| 27 | # suppress warning, but don't bother with autonamer |
| 28 | LEAD_SONAME = "libnss_mdns.so" |
| 29 | DEBIANNAME_${PN} = "libnss-mdns" |
| 30 | |
| 31 | RDEPENDS_${PN} = "avahi-daemon" |
| 32 | |
| 33 | pkg_postinst_${PN} () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 34 | sed ' |
| 35 | /^hosts:/ !b |
| 36 | /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b |
| 37 | s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g |
| 38 | ' -i $D${sysconfdir}/nsswitch.conf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | pkg_prerm_${PN} () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | sed ' |
| 43 | /^hosts:/ !b |
| 44 | s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g |
| 45 | ' -i $D${sysconfdir}/nsswitch.conf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | } |