diff options
author | Graeme Gregory <dp@xora.org.uk> | 2009-05-18 09:52:45 +0100 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2009-05-18 09:52:45 +0100 |
commit | 393066c818047a5cf6c90455e6874c4e901f5edf (patch) | |
tree | 626671bc20940c13868c2435825094d0fb555987 /recipes | |
parent | dba4943a54c97d1479b60ff05a6f36aee91082ee (diff) |
libnss-mdns_0.10.bb : add new version of the mdns resolver
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/libnss-mdns/libnss-mdns_0.10.bb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/libnss-mdns/libnss-mdns_0.10.bb b/recipes/libnss-mdns/libnss-mdns_0.10.bb new file mode 100644 index 0000000000..b325f826d6 --- /dev/null +++ b/recipes/libnss-mdns/libnss-mdns_0.10.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "NSS module for Multicast DNS name resolution" +HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/" +LICENSE = "GPL" +SECTION = "libs" +PRIORITY = "optional" + +RRECOMMENDS_${PN} = "zeroconf" +PR = "r0" + +EXTRA_OECONF = "--libdir=/lib" +S = "${WORKDIR}/nss-mdns-${PV}" + +SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" + +inherit autotools + +pkg_postinst_${PN} () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && { + cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)dns/\1mdns4_minimal [NOTFOUND=return] dns mdns4/' > /tmp/nsswitch.conf + mv /tmp/nsswitch.conf /etc/nsswitch.conf + } +} + +pkg_prerm_${PN} () { + cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && { + cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)mdns4_minimal [NOTFOUND=return] dns mdns4/\1dns/' > /tmp/nsswitch.conf + mv /tmp/nsswitch.conf /etc/nsswitch.conf + } +} |