libnss-mdns_0.10.bb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. DESCRIPTION = "NSS module for Multicast DNS name resolution"
  2. HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
  3. SECTION = "libs"
  4. PRIORITY = "optional"
  5. LICENSE = "LGPLv2.1+"
  6. LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
  7. DEPENDS = "avahi"
  8. RDEPENDS = "avahi-daemon"
  9. PR = "r1"
  10. SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
  11. SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7"
  12. SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d"
  13. S = "${WORKDIR}/nss-mdns-${PV}"
  14. inherit autotools
  15. # suppress warning, but don't bother with autonamer
  16. LEAD_SONAME = "libnss_mdns.so"
  17. DEBIANNAME_${PN} = "libnss-mdns"
  18. EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
  19. # TODO: pattern based configuration update
  20. pkg_postinst () {
  21. cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
  22. cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
  23. mv /tmp/nsswitch.conf /etc/nsswitch.conf
  24. }
  25. }
  26. pkg_prerm () {
  27. cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns4$" > /dev/null && {
  28. cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
  29. mv /tmp/nsswitch.conf /etc/nsswitch.conf
  30. }
  31. }