summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi/avahi_0.8.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-05 15:01:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-07 12:15:59 +0100
commitaf24c40ca46eff0390408f7b4e442ec9bdcd0c1e (patch)
tree2a03c7a614fb687287c14cdcc807d9c0c591af14 /meta/recipes-connectivity/avahi/avahi_0.8.bb
parentcca4eebd030c3d568a28b33c7adc17681a1866bd (diff)
downloadpoky-af24c40ca46eff0390408f7b4e442ec9bdcd0c1e.tar.gz
avahi: update to 0.8
(From OE-Core rev: 520cb26ac248994a88f161b6ad92211ffcb93d9b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi_0.8.bb')
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.8.bb181
1 files changed, 181 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb b/meta/recipes-connectivity/avahi/avahi_0.8.bb
new file mode 100644
index 0000000000..f4924fa1cb
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -0,0 +1,181 @@
1SUMMARY = "Avahi IPv4LL network address configuration daemon"
2DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
3allows programs to publish and discover services and hosts running on a local network \
4with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
5IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
6configuration from the link-local 169.254.0.0/16 range without the need for a central \
7server.'
8AUTHOR = "Lennart Poettering <lennart@poettering.net>"
9HOMEPAGE = "http://avahi.org"
10BUGTRACKER = "https://github.com/lathiat/avahi/issues"
11SECTION = "network"
12
13# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
14# python scripts are under GPLv2+
15LICENSE = "GPLv2+ & LGPLv2.1+"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
17 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
18 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
19 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
20 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
21
22SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
23 file://00avahi-autoipd \
24 file://99avahi-autoipd \
25 file://initscript.patch \
26 file://0001-Fix-opening-etc-resolv.conf-error.patch \
27 "
28
29UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
30SRC_URI[md5sum] = "229c6aa30674fc43c202b22c5f8c2be7"
31SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda"
32
33DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
34
35# For gtk related PACKAGECONFIGs: gtk, gtk3
36AVAHI_GTK ?= "gtk3"
37
38PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
39PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
40PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
41PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
42PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus"
43PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent"
44PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase"
45
46inherit autotools pkgconfig gettext gobject-introspection
47
48EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
49 --disable-stack-protector \
50 --disable-gdbm \
51 --disable-dbm \
52 --disable-mono \
53 --disable-monodoc \
54 --disable-qt3 \
55 --disable-qt4 \
56 --disable-python \
57 --disable-doxygen-doc \
58 --enable-manpages \
59 ${EXTRA_OECONF_SYSVINIT} \
60 ${EXTRA_OECONF_SYSTEMD} \
61 "
62
63# The distro choice determines what init scripts are installed
64EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
65EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
66
67do_configure_prepend() {
68 # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
69 rm "${S}/common/introspection.m4" || true
70}
71
72do_compile_prepend() {
73 export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
74}
75
76RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
77
78do_install() {
79 autotools_do_install
80 rm -rf ${D}/run
81 rm -rf ${D}${datadir}/dbus-1/interfaces
82 test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
83 rm -rf ${D}${libdir}/avahi
84}
85
86PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}"
87
88FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*"
89
90RPROVIDES_libavahi-compat-libdnssd = "libdns-sd"
91
92inherit update-rc.d systemd useradd
93
94PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui"
95
96FILES_avahi-ui = "${libdir}/libavahi-ui*.so.*"
97FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
98 ${datadir}/avahi/interfaces/avahi-discover.ui \
99 ${bindir}/avahi-discover-standalone \
100 "
101
102LICENSE_libavahi-gobject = "LGPLv2.1+"
103LICENSE_avahi-daemon = "LGPLv2.1+"
104LICENSE_libavahi-common = "LGPLv2.1+"
105LICENSE_libavahi-core = "LGPLv2.1+"
106LICENSE_avahi-client = "LGPLv2.1+"
107LICENSE_avahi-dnsconfd = "LGPLv2.1+"
108LICENSE_libavahi-glib = "LGPLv2.1+"
109LICENSE_avahi-autoipd = "LGPLv2.1+"
110LICENSE_avahi-utils = "LGPLv2.1+"
111
112# As avahi doesn't put any files into PN, clear the files list to avoid problems
113# if extra libraries appear.
114FILES_${PN} = ""
115FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
116 ${sysconfdir}/avahi/avahi-autoipd.action \
117 ${sysconfdir}/dhcp/*/avahi-autoipd \
118 ${sysconfdir}/udhcpc.d/00avahi-autoipd \
119 ${sysconfdir}/udhcpc.d/99avahi-autoipd"
120FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
121FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
122FILES_avahi-daemon = "${sbindir}/avahi-daemon \
123 ${sysconfdir}/avahi/avahi-daemon.conf \
124 ${sysconfdir}/avahi/hosts \
125 ${sysconfdir}/avahi/services \
126 ${sysconfdir}/dbus-1 \
127 ${sysconfdir}/init.d/avahi-daemon \
128 ${datadir}/avahi/introspection/*.introspect \
129 ${datadir}/avahi/avahi-service.dtd \
130 ${datadir}/avahi/service-types \
131 ${datadir}/dbus-1/system-services"
132FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
133FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
134 ${sysconfdir}/avahi/avahi-dnsconfd.action \
135 ${sysconfdir}/init.d/avahi-dnsconfd"
136FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
137FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
138FILES_avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*"
139
140RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})"
141RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}"
142
143RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
144
145CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
146
147USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
148USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \
149 --no-create-home --shell /bin/false \
150 --user-group avahi"
151
152USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \
153 --no-create-home --shell /bin/false \
154 --user-group \
155 -c \"Avahi autoip daemon\" \
156 avahi-autoipd"
157
158INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
159INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
160INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
161INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
162INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
163
164SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
165SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
166SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
167
168do_install_append() {
169 install -d ${D}${sysconfdir}/udhcpc.d
170 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
171 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
172}
173
174# At the time the postinst runs, dbus might not be setup so only restart if running
175# Don't exit early, because update-rc.d needs to run subsequently.
176pkg_postinst_avahi-daemon () {
177if [ -z "$D" ]; then
178 killall -q -HUP dbus-daemon || true
179fi
180}
181