summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc117
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.6.27.bb16
-rw-r--r--meta/recipes-connectivity/avahi/files/00avahi-autoipd10
-rw-r--r--meta/recipes-connectivity/avahi/files/99avahi-autoipd10
-rw-r--r--meta/recipes-connectivity/avahi/files/initscript.patch39
5 files changed, 192 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..2a5bf4a182
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -0,0 +1,117 @@
1DESCRIPTION = "Avahi implements the DNS-SD over Multicast DNS"
2AUTHOR = "Lennart Poettering <lennart@poettering.net>"
3HOMEPAGE = "http://avahi.org"
4BUGTRACKER = "http://avahi.org/report"
5SECTION = "network"
6PRIORITY = "optional"
7
8# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
9# python scripts are under GPLv2+
10LICENSE = "GPLv2+ & LGPLv2.1+"
11
12DEPENDS = "expat libdaemon dbus glib-2.0 gtk+ libglade"
13RRECOMMENDS = "libnss-mdns"
14RRECOMMENDS_avahi-daemon = "libnss-mdns"
15
16SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
17 file://00avahi-autoipd \
18 file://99avahi-autoipd \
19 file://initscript.patch;patch=1"
20
21inherit autotools pkgconfig update-rc.d gettext
22
23EXTRA_OECONF = "--with-distro=debian \
24 --with-avahi-priv-access-group=adm \
25 --disable-stack-protector \
26 --disable-gdbm \
27 --disable-mono \
28 --disable-monodoc \
29 --disable-qt3 \
30 --disable-qt4 \
31 --disable-python \
32 --disable-doxygen-doc"
33
34PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-gobject avahi-autoipd avahi-utils libavahi-ui avahi-ui-utils"
35
36FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
37FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
38FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
39FILES_avahi-daemon = "${sbindir}/avahi-daemon \
40 ${sysconfdir}/avahi/avahi-daemon.conf \
41 ${sysconfdir}/avahi/hosts \
42 ${sysconfdir}/avahi/services \
43 ${sysconfdir}/dbus-1 \
44 ${sysconfdir}/init.d/avahi-daemon \
45 ${datadir}/avahi/introspection/*.introspect \
46 ${datadir}/avahi/avahi-service.dtd \
47 ${datadir}/avahi/service-types"
48FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
49FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
50 ${sysconfdir}/avahi/avahi-dnsconfd.action \
51 ${sysconfdir}/init.d/avahi-dnsconfd"
52FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
53FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
54FILES_avahi-utils = "${bindir}/avahi-*"
55FILES_avahi-ui-utils = "${bindir}/bssh ${bindir}/bvnc ${bindir}/bshell \
56 ${datadir}/applications \
57 ${datadir}/avahi/interfaces"
58
59CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
60
61INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
62INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
63INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
64INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
65INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
66
67do_install() {
68 autotools_do_install
69
70 # don't install /var/run when populating rootfs. Do it through volatile
71 # /var/run of current version is empty, so just remove it.
72 # if /var/run become non-empty in the future, need to install it via volatile
73 rm -rf ${D}/var/run
74}
75
76# At the time the postinst runs, dbus might not be setup so only restart if running
77
78pkg_postinst_avahi-daemon () {
79 # can't do this offline
80 if [ "x$D" != "x" ]; then
81 exit 1
82 fi
83 grep "^avahi:" /etc/group > /dev/null || addgroup avahi
84 grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
85
86 DBUSPID=`pidof dbus-daemon`
87
88 if [ "x$DBUSPID" != "x" ]; then
89 /etc/init.d/dbus-1 force-reload
90 fi
91}
92
93pkg_postinst_avahi-autoipd () {
94 # can't do this offline
95 if [ "x$D" != "x" ]; then
96 exit 1
97 fi
98 grep "^avahi-autoipd:" /etc/group > /dev/null || addgroup avahi-autoipd
99 grep "^avahi-autoipd:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/avahi-autoipd --no-create-home avahi-autoipd --ingroup avahi-autoipd -g "Avahi autoip daemon"
100}
101
102pkg_postrm_avahi-daemon () {
103 deluser avahi || true
104 delgroup avahi || true
105}
106
107pkg_postrm_avahi-autoipd () {
108 deluser avahi-autoipd || true
109 delgroup avahi-autoipd || true
110}
111
112do_install_avahi-autoipd() {
113 autotools_do_install
114 install -d ${D}${sysconfdir}/udhcpc.d
115 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
116 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
117}
diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.27.bb b/meta/recipes-connectivity/avahi/avahi_0.6.27.bb
new file mode 100644
index 0000000000..a4c22a8b0e
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi_0.6.27.bb
@@ -0,0 +1,16 @@
1require avahi.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
4 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
5 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
6 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
7 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
8
9RDEPENDS_avahi-daemon = "sysvinit-pidof"
10PR = "r1"
11
12EXTRA_OECONF += "--disable-gtk3"
13
14FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
15 ${sysconfdir}/avahi/avahi-autoipd.action \
16 ${sysconfdir}/dhcp3/*/avahi-autoipd"
diff --git a/meta/recipes-connectivity/avahi/files/00avahi-autoipd b/meta/recipes-connectivity/avahi/files/00avahi-autoipd
new file mode 100644
index 0000000000..a0ab814603
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/00avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 deconfig|renew|bound)
8 /usr/sbin/avahi-autoipd -k $interface 2> /dev/null
9 ;;
10esac
diff --git a/meta/recipes-connectivity/avahi/files/99avahi-autoipd b/meta/recipes-connectivity/avahi/files/99avahi-autoipd
new file mode 100644
index 0000000000..234cdaa3eb
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/99avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 leasefail)
8 /usr/sbin/avahi-autoipd -wD $interface 2> /dev/null
9 ;;
10esac
diff --git a/meta/recipes-connectivity/avahi/files/initscript.patch b/meta/recipes-connectivity/avahi/files/initscript.patch
new file mode 100644
index 0000000000..f76a965b85
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/initscript.patch
@@ -0,0 +1,39 @@
1diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
2index 30a2c2f..b5848a8 100755
3--- a/initscript/debian/avahi-daemon.in
4+++ b/initscript/debian/avahi-daemon.in
5@@ -1,2 +1,14 @@
6 #!/bin/sh
7-
8+### BEGIN INIT INFO
9+# Provides: avahi
10+# Required-Start: $remote_fs dbus
11+# Required-Stop: $remote_fs dbus
12+# Should-Start: $syslog
13+# Should-Stop: $syslog
14+# Default-Start: 2 3 4 5
15+# Default-Stop: 0 1 6
16+# Short-Description: Avahi mDNS/DNS-SD Daemon
17+# Description: Zeroconf daemon for configuring your network
18+# automatically
19+### END INIT INFO
20+#
21diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
22index ac34804..f95c340 100755
23--- a/initscript/debian/avahi-dnsconfd.in
24+++ b/initscript/debian/avahi-dnsconfd.in
25@@ -1,1 +1,14 @@
26 #!/bin/sh
27+### BEGIN INIT INFO
28+# Provides: avahi-dnsconfd
29+# Required-Start: $remote_fs avahi
30+# Required-Stop: $remote_fs avahi
31+# Should-Start: $syslog
32+# Should-Stop: $syslog
33+# Default-Start: 2 3 4 5
34+# Default-Stop: 0 1 6
35+# Short-Description: Avahi mDNS/DNS-SD DNS configuration
36+# Description: Zeroconf daemon for configuring your network
37+# automatically
38+### END INIT INFO
39+#