Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" |
| 2 | DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." |
| 3 | HOMEPAGE = "http://developer.apple.com/networking/bonjour/" |
| 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" |
| 6 | |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 7 | COMPATIBLE_HOST_libc-musl = 'null' |
| 8 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | RPROVIDES_${PN} += "libdns_sd.so" |
| 10 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 11 | SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | file://build.patch;patchdir=.. \ |
| 13 | file://mdns.service \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 14 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 15 | SRC_URI[md5sum] = "aeb92d838a4aa2402ef128ed501484eb" |
| 16 | SRC_URI[sha256sum] = "3cc71582e8eee469c2de8ecae1d769e7f32b3468dfb7f2ca77f1dee1f30a7d1e" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | |
| 18 | PARALLEL_MAKE = "" |
| 19 | |
| 20 | S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix" |
| 21 | |
| 22 | EXTRA_OEMAKE += "os=linux DEBUG=0 'CC=${CC}' 'LD=${CCLD} ${LDFLAGS}'" |
| 23 | |
| 24 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 25 | |
| 26 | do_install () { |
| 27 | install -d ${D}${sbindir} |
| 28 | install -m 0755 build/prod/mdnsd ${D}${sbindir} |
| 29 | |
| 30 | install -d ${D}${libdir} |
| 31 | cp build/prod/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 |
| 32 | chmod 0644 ${D}${libdir}/libdns_sd.so.1 |
| 33 | ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so |
| 34 | |
| 35 | install -d ${D}${includedir} |
| 36 | install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir} |
| 37 | |
| 38 | install -d ${D}${mandir}/man8 |
| 39 | install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 |
| 40 | |
| 41 | install -d ${D}${bindir} |
| 42 | install -m 0755 ../Clients/build/dns-sd ${D}${bindir} |
| 43 | |
| 44 | install -d ${D}${libdir} |
| 45 | oe_libinstall -C build/prod -so libnss_mdns-0.2 ${D}${libdir} |
| 46 | ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 |
| 47 | |
| 48 | install -d ${D}${sysconfdir} |
| 49 | install -m 0644 nss_mdns.conf ${D}${sysconfdir} |
| 50 | |
| 51 | install -d ${D}${mandir}/man5 |
| 52 | install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5 |
| 53 | |
| 54 | install -d ${D}${mandir}/man8 |
| 55 | install -m 0644 libnss_mdns.8 ${D}${mandir}/man8 |
| 56 | |
| 57 | install -d ${D}${systemd_unitdir}/system/ |
| 58 | install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_unitdir}/system/ |
| 59 | } |
| 60 | |
| 61 | pkg_postinst_${PN} () { |
| 62 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ |
| 63 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ |
| 64 | -i $D/etc/nsswitch.conf |
| 65 | } |
| 66 | |
| 67 | pkg_prerm_${PN} () { |
| 68 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ |
| 69 | -e '/^hosts:/s/\s*mdns//' \ |
| 70 | -i $D/etc/nsswitch.conf |
| 71 | } |
| 72 | |
| 73 | inherit systemd |
| 74 | |
| 75 | SYSTEMD_SERVICE_${PN} = "mdns.service" |
| 76 | |
| 77 | FILES_${PN} += "${systemd_unitdir}/system/mdns.service" |
| 78 | FILES_${PN} += "${libdir}/libdns_sd.so.1 \ |
| 79 | ${bindir}/dns-sd \ |
| 80 | ${libdir}/libnss_mdns-0.2.so \ |
| 81 | ${sysconfdir}/nss_mdns.conf" |
| 82 | |
| 83 | FILES_${PN}-dev += "${libdir}/libdns_sd.so \ |
| 84 | ${includedir}/dns_sd.h " |
| 85 | |
| 86 | FILES_${PN}-man += "${mandir}/man8/mdnsd.8 \ |
| 87 | ${mandir}/man5/nss_mdns.conf.5 \ |
| 88 | ${mandir}/man8/libnss_mdns.8" |
| 89 | |
| 90 | PACKAGES = "${PN} ${PN}-dev ${PN}-man ${PN}-dbg" |