diff options
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi.inc')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 117 |
1 files changed, 117 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 @@ | |||
1 | DESCRIPTION = "Avahi implements the DNS-SD over Multicast DNS" | ||
2 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
3 | HOMEPAGE = "http://avahi.org" | ||
4 | BUGTRACKER = "http://avahi.org/report" | ||
5 | SECTION = "network" | ||
6 | PRIORITY = "optional" | ||
7 | |||
8 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | ||
9 | # python scripts are under GPLv2+ | ||
10 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
11 | |||
12 | DEPENDS = "expat libdaemon dbus glib-2.0 gtk+ libglade" | ||
13 | RRECOMMENDS = "libnss-mdns" | ||
14 | RRECOMMENDS_avahi-daemon = "libnss-mdns" | ||
15 | |||
16 | SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | ||
17 | file://00avahi-autoipd \ | ||
18 | file://99avahi-autoipd \ | ||
19 | file://initscript.patch;patch=1" | ||
20 | |||
21 | inherit autotools pkgconfig update-rc.d gettext | ||
22 | |||
23 | EXTRA_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 | |||
34 | PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-gobject avahi-autoipd avahi-utils libavahi-ui avahi-ui-utils" | ||
35 | |||
36 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | ||
37 | FILES_libavahi-core = "${libdir}/libavahi-core.so.*" | ||
38 | FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" | ||
39 | FILES_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" | ||
48 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | ||
49 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | ||
50 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ | ||
51 | ${sysconfdir}/init.d/avahi-dnsconfd" | ||
52 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | ||
53 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*" | ||
54 | FILES_avahi-utils = "${bindir}/avahi-*" | ||
55 | FILES_avahi-ui-utils = "${bindir}/bssh ${bindir}/bvnc ${bindir}/bshell \ | ||
56 | ${datadir}/applications \ | ||
57 | ${datadir}/avahi/interfaces" | ||
58 | |||
59 | CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | ||
60 | |||
61 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" | ||
62 | INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" | ||
63 | INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" | ||
64 | INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd" | ||
65 | INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19" | ||
66 | |||
67 | do_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 | |||
78 | pkg_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 | |||
93 | pkg_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 | |||
102 | pkg_postrm_avahi-daemon () { | ||
103 | deluser avahi || true | ||
104 | delgroup avahi || true | ||
105 | } | ||
106 | |||
107 | pkg_postrm_avahi-autoipd () { | ||
108 | deluser avahi-autoipd || true | ||
109 | delgroup avahi-autoipd || true | ||
110 | } | ||
111 | |||
112 | do_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 | } | ||