Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks."
  2. HOMEPAGE = "http://developer.apple.com/networking/bonjour/"
  3. LICENSE = "Apache-2.0"
  4. LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf"
  5.  
  6. PR = "r1"
  7.  
  8. TARGET_CC_ARCH += "${LDFLAGS}"
  9.  
  10. inherit systemd
  11.  
  12. SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
  13. file://0001-fixed-posix-build.patch \
  14. file://DirectLink-optimization.patch \
  15. file://mdns.service \
  16. "
  17.  
  18. INSANE_SKIP_${PN} += "dev-so file-rdeps"
  19.  
  20. SRC_URI[md5sum] = "16dc2098f97fe5347c82c898566befb4"
  21. SRC_URI[sha256sum] = "8efdd7d57445f4defdb450217c31afc5c5d258822764bb02f4e8282430b33119"
  22.  
  23. S = "${WORKDIR}/mDNSResponder-${PV}"
  24.  
  25. EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"'
  26.  
  27. do_compile () {
  28. cd mDNSPosix
  29. oe_runmake os=linux DEBUG=0
  30. }
  31.  
  32. do_install () {
  33. install -d ${D}${bindir}
  34. install -m 755 ${S}/Clients/build/dns-sd ${D}${bindir}/
  35.  
  36. install -d ${D}${includedir}
  37. install -m 644 ${S}/mDNSShared/dns_sd.h ${D}${includedir}/
  38.  
  39. install -d ${D}${sysconfdir}
  40. install -m 644 ${S}/mDNSPosix/nss_mdns.conf ${D}${sysconfdir}/
  41.  
  42. install -d ${D}${libdir}
  43. install -m 755 ${S}/mDNSPosix/build/prod/libdns_sd.so ${D}${libdir}/libdns_sd.so.1
  44. install -m 755 ${S}/mDNSPosix/build/prod/libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2
  45.  
  46. ln -sf libdns_sd.so.1 ${D}${libdir}/libdns_sd.so
  47. ln -sf libnss_mdns.so.2 ${D}${libdir}/libnss_mdns-0.2.so
  48.  
  49. install -d ${D}${sysconfdir}/systemd/system
  50. install -m 644 ${WORKDIR}/mdns.service ${D}${sysconfdir}/systemd/system
  51.  
  52. install -d ${D}${sbindir}
  53. install -m 755 ${S}/mDNSPosix/build/prod/mdnsd ${D}${sbindir}
  54.  
  55. install -d ${D}/usr/share/man/man5
  56. install -d ${D}/usr/share/man/man8
  57. }
  58.  
  59.  
  60. SYSTEMD_SERVICE_${PN} = "mdns.service"
  61. PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
  62.  
  63. pkg_postinst_${PN} () {
  64. sed -e '/^hosts:/s/\s*\<mdns\>//' \
  65. -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \
  66. -i $D/etc/nsswitch.conf
  67. }
  68.  
  69. pkg_prerm_${PN} () {
  70. sed -e '/^hosts:/s/\s*\<mdns\>//' \
  71. -e '/^hosts:/s/\s*mdns//' \
  72. -i $D/etc/nsswitch.conf
  73. }
  74.  
  75. FILES_${PN} += "${libdir} \
  76. ${sysconfdir} \
  77. ${bindir} \
  78. ${sbindir} \
  79. ${includedir} \
  80. "
  81.  
  82. FILES_${PN}-dev += "${includedir}"
  83.  
  84. FILES_${PN}-dbg += "${libdir}/.debug/*"
  85.  
  86. FILES_${PN}-man += "${mandir}/man8/mdnsd.8 \
  87. ${mandir}/man5/nss_mdns.conf.5 \
  88. ${mandir}/man8/libnss_mdns.8 \
  89. "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement