2010-11-18 23:43:01 +00:00
|
|
|
SUMMARY = "Avahi IPv4LL network address configuration daemon"
|
2012-08-17 00:10:35 +00:00
|
|
|
DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
|
2010-09-28 14:30:42 +00:00
|
|
|
allows programs to publish and discover services and hosts running on a local network \
|
|
|
|
with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
|
|
|
|
IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
|
|
|
|
configuration from the link-local 169.254.0.0/16 range without the need for a central \
|
2012-08-17 00:10:35 +00:00
|
|
|
server.'
|
2006-05-22 22:15:25 +00:00
|
|
|
AUTHOR = "Lennart Poettering <lennart@poettering.net>"
|
2006-01-19 21:55:53 +00:00
|
|
|
HOMEPAGE = "http://avahi.org"
|
2016-02-17 14:00:19 +00:00
|
|
|
BUGTRACKER = "https://github.com/lathiat/avahi/issues"
|
2006-12-24 09:34:49 +00:00
|
|
|
SECTION = "network"
|
2010-07-01 09:17:21 +00:00
|
|
|
|
|
|
|
# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
|
|
|
|
# python scripts are under GPLv2+
|
|
|
|
LICENSE = "GPLv2+ & LGPLv2.1+"
|
|
|
|
|
2016-03-08 11:05:48 +00:00
|
|
|
DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
|
2011-04-01 03:20:16 +00:00
|
|
|
|
2016-02-17 14:00:19 +00:00
|
|
|
SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
|
2011-06-08 12:06:13 +00:00
|
|
|
file://00avahi-autoipd \
|
|
|
|
file://99avahi-autoipd \
|
2012-05-03 18:31:55 +00:00
|
|
|
file://initscript.patch \
|
|
|
|
"
|
2016-02-17 14:00:19 +00:00
|
|
|
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
2005-12-12 14:45:48 +00:00
|
|
|
|
2016-07-26 01:54:57 +00:00
|
|
|
# For gtk related PACKAGECONFIGs: gtk, gtk3 and pygtk
|
|
|
|
AVAHI_GTK ?= ""
|
|
|
|
|
|
|
|
PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
|
2016-03-01 12:49:44 +00:00
|
|
|
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
|
2016-07-26 01:54:57 +00:00
|
|
|
PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
|
|
|
|
PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
|
|
|
|
PACKAGECONFIG[pygtk] = "--enable-pygtk,--disable-pygtk,"
|
2016-03-01 12:49:44 +00:00
|
|
|
|
2012-12-17 09:46:46 +00:00
|
|
|
USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
|
avahi: fix useradd race condition
Avahi doesn't work at boot because of:
+ sh /OE/../rootfs/var/lib/opkg/info/avahi-daemon.preinst
Running useradd commands...
grep: /OE/../rootfs/etc/passwd: No such file or directory
That is due to:
Package: avahi-daemon
Version: 0.6.30-r9.0
[..]
Depends: libavahi-core7 (>= 0.6.30), libdaemon0 (>= 0.14), libcap2 (>= 2.22), libavahi-common3 (>= 0.6.30), libdbus-1-3 (>= 1.4.12), sysvinit-pidof, libc6 (>= 2.12), libexpat1 (>= 2.0.1)
After this patch:
Package: avahi-daemon
Version: 0.6.30-r10.0
[..]
Depends: libavahi-core7 (>= 0.6.30), libdaemon0 (>= 0.14), libcap2 (>= 2.22), libavahi-common3 (>= 0.6.30), libdbus-1-3 (>= 1.4.12), sysvinit-pidof, libc6 (>= 2.12), shadow, libexpat1 (>= 2.0.1), base-passwd
This also changes ${PN}-daemon to avahi-daemon to be consistent with the PACKAGES/FILES lines below
(From OE-Core rev: f01fbc17b5d9bf9a227d64fe858014376cd19432)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-03 12:57:00 +00:00
|
|
|
USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
|
2011-10-27 14:08:40 +00:00
|
|
|
--no-create-home --shell /bin/false \
|
|
|
|
--user-group avahi"
|
|
|
|
|
2012-12-17 09:46:46 +00:00
|
|
|
USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
|
|
|
|
--no-create-home --shell /bin/false \
|
|
|
|
--user-group \
|
|
|
|
-c \"Avahi autoip daemon\" \
|
|
|
|
avahi-autoipd"
|
|
|
|
|
2016-03-09 15:01:57 +00:00
|
|
|
inherit autotools pkgconfig update-rc.d gettext useradd gobject-introspection
|
2013-02-08 22:43:18 +00:00
|
|
|
|
2016-03-09 15:01:57 +00:00
|
|
|
EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
|
2008-07-25 09:27:36 +00:00
|
|
|
--disable-stack-protector \
|
2007-11-07 14:55:34 +00:00
|
|
|
--disable-gdbm \
|
|
|
|
--disable-mono \
|
|
|
|
--disable-monodoc \
|
|
|
|
--disable-qt3 \
|
|
|
|
--disable-qt4 \
|
|
|
|
--disable-python \
|
2011-05-27 09:32:37 +00:00
|
|
|
--disable-doxygen-doc \
|
2016-09-29 13:27:59 +00:00
|
|
|
--enable-manpages \
|
2013-02-08 22:43:18 +00:00
|
|
|
${EXTRA_OECONF_SYSVINIT} \
|
|
|
|
${EXTRA_OECONF_SYSTEMD} \
|
2011-09-20 15:14:46 +00:00
|
|
|
"
|
2011-05-27 09:32:37 +00:00
|
|
|
|
2013-02-08 22:43:18 +00:00
|
|
|
# The distro choice determines what init scripts are installed
|
2014-04-24 18:59:20 +00:00
|
|
|
EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
|
|
|
|
EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
|
2013-02-08 22:43:18 +00:00
|
|
|
|
2005-12-12 14:45:48 +00:00
|
|
|
|
2011-09-20 15:14:46 +00:00
|
|
|
LDFLAGS_append_libc-uclibc = " -lintl"
|
|
|
|
LDFLAGS_append_uclinux-uclibc = " -lintl"
|
2011-06-01 14:27:31 +00:00
|
|
|
|
2011-09-20 15:14:46 +00:00
|
|
|
do_configure_prepend() {
|
2013-02-04 10:44:15 +00:00
|
|
|
sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
|
2016-03-09 15:01:57 +00:00
|
|
|
|
|
|
|
# This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
|
|
|
|
rm "${S}/common/introspection.m4" || true
|
2011-06-01 14:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-03-09 15:01:57 +00:00
|
|
|
do_compile_prepend() {
|
2016-06-09 08:35:33 +00:00
|
|
|
export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
|
2016-03-09 15:01:57 +00:00
|
|
|
}
|
2011-06-08 12:06:13 +00:00
|
|
|
|
2013-02-08 22:43:18 +00:00
|
|
|
PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
|
2011-06-08 12:06:13 +00:00
|
|
|
|
2014-08-15 16:55:22 +00:00
|
|
|
# As avahi doesn't put any files into PN, clear the files list to avoid problems
|
|
|
|
# if extra libraries appear.
|
2015-05-26 10:41:41 +00:00
|
|
|
FILES_${PN} = ""
|
2011-06-08 12:06:13 +00:00
|
|
|
FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
|
|
|
|
${sysconfdir}/avahi/avahi-autoipd.action \
|
2012-08-17 00:10:35 +00:00
|
|
|
${sysconfdir}/dhcp/*/avahi-autoipd \
|
|
|
|
${sysconfdir}/udhcpc.d/00avahi-autoipd \
|
|
|
|
${sysconfdir}/udhcpc.d/99avahi-autoipd"
|
2005-12-12 14:45:48 +00:00
|
|
|
FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
|
2016-03-09 15:01:57 +00:00
|
|
|
FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
|
2005-12-12 14:45:48 +00:00
|
|
|
FILES_avahi-daemon = "${sbindir}/avahi-daemon \
|
2006-12-24 09:34:49 +00:00
|
|
|
${sysconfdir}/avahi/avahi-daemon.conf \
|
|
|
|
${sysconfdir}/avahi/hosts \
|
|
|
|
${sysconfdir}/avahi/services \
|
|
|
|
${sysconfdir}/dbus-1 \
|
|
|
|
${sysconfdir}/init.d/avahi-daemon \
|
|
|
|
${datadir}/avahi/introspection/*.introspect \
|
|
|
|
${datadir}/avahi/avahi-service.dtd \
|
2011-06-08 12:06:13 +00:00
|
|
|
${datadir}/avahi/service-types \
|
|
|
|
${datadir}/dbus-1/system-services"
|
2005-12-12 14:45:48 +00:00
|
|
|
FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
|
2011-09-20 15:14:46 +00:00
|
|
|
FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
|
2005-12-12 14:45:48 +00:00
|
|
|
FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
|
2006-12-24 09:34:49 +00:00
|
|
|
${sysconfdir}/avahi/avahi-dnsconfd.action \
|
|
|
|
${sysconfdir}/init.d/avahi-dnsconfd"
|
2005-12-12 14:45:48 +00:00
|
|
|
FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
|
2016-03-09 15:01:57 +00:00
|
|
|
FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
|
2006-01-19 21:55:53 +00:00
|
|
|
FILES_avahi-utils = "${bindir}/avahi-*"
|
2011-09-20 15:14:46 +00:00
|
|
|
|
2014-08-16 09:34:55 +00:00
|
|
|
RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})"
|
|
|
|
|
2011-09-20 15:14:46 +00:00
|
|
|
# uclibc has no nss
|
2013-11-24 13:28:27 +00:00
|
|
|
RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
|
|
|
|
RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
|
2005-12-12 14:45:48 +00:00
|
|
|
|
2011-04-01 03:20:16 +00:00
|
|
|
RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
|
|
|
|
RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
|
|
|
|
|
2012-02-26 21:53:02 +00:00
|
|
|
RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
|
2011-01-17 15:31:11 +00:00
|
|
|
|
2005-12-12 14:45:48 +00:00
|
|
|
CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
|
|
|
|
|
|
|
|
INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
|
|
|
|
INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
|
|
|
|
INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
|
|
|
|
INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
|
|
|
|
INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
|
|
|
|
|
2010-07-27 08:05:29 +00:00
|
|
|
do_install() {
|
|
|
|
autotools_do_install
|
|
|
|
|
|
|
|
# don't install /var/run when populating rootfs. Do it through volatile
|
|
|
|
# /var/run of current version is empty, so just remove it.
|
|
|
|
# if /var/run become non-empty in the future, need to install it via volatile
|
2014-08-15 16:55:22 +00:00
|
|
|
rm -rf ${D}${localstatedir}/run
|
|
|
|
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
2011-09-20 15:14:46 +00:00
|
|
|
rm -rf ${D}${datadir}/dbus-1/interfaces
|
2016-03-01 12:49:44 +00:00
|
|
|
test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
|
2012-04-27 06:34:21 +00:00
|
|
|
rm -rf ${D}${libdir}/avahi
|
2011-09-20 15:14:46 +00:00
|
|
|
|
|
|
|
install -d ${D}${sysconfdir}/udhcpc.d
|
|
|
|
install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
|
|
|
|
install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
|
2010-07-27 08:05:29 +00:00
|
|
|
}
|
|
|
|
|
2011-10-27 14:08:40 +00:00
|
|
|
# At the time the postinst runs, dbus might not be setup so only restart if running
|
2012-04-17 10:37:17 +00:00
|
|
|
# Don't exit early, because update-rc.d needs to run subsequently.
|
2006-08-27 22:34:19 +00:00
|
|
|
|
2005-12-12 14:45:48 +00:00
|
|
|
pkg_postinst_avahi-daemon () {
|
2012-04-17 10:37:17 +00:00
|
|
|
if [ -z "$D" ]; then
|
2013-04-16 14:25:03 +00:00
|
|
|
killall -q -HUP dbus-daemon || true
|
2012-04-17 10:37:17 +00:00
|
|
|
fi
|
2005-12-12 14:45:48 +00:00
|
|
|
}
|