summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi/avahi.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi.inc')
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc150
1 files changed, 150 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
new file mode 100644
index 0000000000..cf063db8b0
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -0,0 +1,150 @@
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 = "http://avahi.org/report"
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+"
16
17INC_PR = "r7"
18
19DEPENDS = "expat libcap libdaemon dbus glib-2.0"
20
21SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
22 file://00avahi-autoipd \
23 file://99avahi-autoipd \
24 file://initscript.patch \
25 file://avahi_fix_install_issue.patch \
26 file://fix_for_automake_1.12.x.patch \
27 file://out-of-tree.patch \
28 "
29
30USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
31USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
32 --no-create-home --shell /bin/false \
33 --user-group avahi"
34
35USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
36 --no-create-home --shell /bin/false \
37 --user-group \
38 -c \"Avahi autoip daemon\" \
39 avahi-autoipd"
40
41inherit autotools pkgconfig update-rc.d gettext useradd
42
43EXTRA_OECONF = "--disable-introspection \
44 --with-avahi-priv-access-group=adm \
45 --disable-stack-protector \
46 --disable-gdbm \
47 --disable-mono \
48 --disable-monodoc \
49 --disable-qt3 \
50 --disable-qt4 \
51 --disable-python \
52 --disable-doxygen-doc \
53 ${EXTRA_OECONF_SYSVINIT} \
54 ${EXTRA_OECONF_SYSTEMD} \
55 ${AVAHI_GTK} \
56 "
57
58# The distro choice determines what init scripts are installed
59EXTRA_OECONF_SYSVINIT = "${@base_contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
60EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
61
62AVAHI_GTK ?= "--disable-gtk --disable-gtk3"
63
64LDFLAGS_append_libc-uclibc = " -lintl"
65LDFLAGS_append_uclinux-uclibc = " -lintl"
66
67do_configure_prepend() {
68 sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
69}
70
71
72PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
73
74FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
75 ${sysconfdir}/avahi/avahi-autoipd.action \
76 ${sysconfdir}/dhcp/*/avahi-autoipd \
77 ${sysconfdir}/udhcpc.d/00avahi-autoipd \
78 ${sysconfdir}/udhcpc.d/99avahi-autoipd"
79FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
80FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
81FILES_avahi-daemon = "${sbindir}/avahi-daemon \
82 ${sysconfdir}/avahi/avahi-daemon.conf \
83 ${sysconfdir}/avahi/hosts \
84 ${sysconfdir}/avahi/services \
85 ${sysconfdir}/dbus-1 \
86 ${sysconfdir}/init.d/avahi-daemon \
87 ${datadir}/avahi/introspection/*.introspect \
88 ${datadir}/avahi/avahi-service.dtd \
89 ${datadir}/avahi/service-types \
90 ${datadir}/dbus-1/system-services"
91FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
92FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
93FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
94 ${sysconfdir}/avahi/avahi-dnsconfd.action \
95 ${sysconfdir}/init.d/avahi-dnsconfd"
96FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
97FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
98FILES_avahi-utils = "${bindir}/avahi-*"
99
100# uclibc has no nss
101RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns"
102RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns"
103
104RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
105RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
106
107RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
108
109CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
110
111INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
112INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
113INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
114INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
115INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
116
117do_install() {
118 autotools_do_install
119
120 # don't install /var/run when populating rootfs. Do it through volatile
121 # /var/run of current version is empty, so just remove it.
122 # if /var/run become non-empty in the future, need to install it via volatile
123 rm -rf ${D}/var/run
124 rm -rf ${D}${datadir}/dbus-1/interfaces
125 rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
126 rm -rf ${D}${libdir}/avahi
127
128 install -d ${D}${sysconfdir}/udhcpc.d
129 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
130 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
131}
132
133# At the time the postinst runs, dbus might not be setup so only restart if running
134# Don't exit early, because update-rc.d needs to run subsequently.
135
136pkg_postinst_avahi-daemon () {
137if [ -z "$D" ]; then
138 killall -q -HUP dbus-daemon || true
139fi
140}
141
142pkg_postrm_avahi-daemon () {
143 deluser avahi || true
144 delgroup avahi || true
145}
146
147pkg_postrm_avahi-autoipd () {
148 deluser avahi-autoipd || true
149 delgroup avahi-autoipd || true
150}