netbase: fix non working wpa_supplicant detection in network restarts. Push PR.
[openembedded.git] / recipes / libnss-mdns / libnss-mdns_0.10.bb
1 DESCRIPTION = "NSS module for Multicast DNS name resolution"
2 HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
3 LICENSE = "GPL"
4 SECTION = "libs"
5 PRIORITY = "optional"
6
7 RRECOMMENDS_${PN} = "zeroconf"
8 PR = "r0"
9
10 EXTRA_OECONF = "--libdir=/lib"
11 S = "${WORKDIR}/nss-mdns-${PV}"
12
13 SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
14
15 inherit autotools
16
17 pkg_postinst_${PN} () {
18         # can't do this offline
19         if [ "x$D" != "x" ]; then
20                 exit 1
21         fi
22         cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
23                 cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)dns/\1mdns4_minimal [NOTFOUND=return] dns mdns4/' > /tmp/nsswitch.conf
24                 mv /tmp/nsswitch.conf /etc/nsswitch.conf
25         }
26 }
27
28 pkg_prerm_${PN} () {
29         cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
30                 cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)mdns4_minimal [NOTFOUND=return] dns mdns4/\1dns/' > /tmp/nsswitch.conf
31                 mv /tmp/nsswitch.conf /etc/nsswitch.conf
32         }
33 }