diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:38:32 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:50:20 +0100 |
commit | e2e6f6fe07049f33cb6348780fa975162752e421 (patch) | |
tree | b1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-connectivity/avahi/avahi.inc | |
download | poky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz |
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi.inc')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 150 |
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 @@ | |||
1 | SUMMARY = "Avahi IPv4LL network address configuration daemon" | ||
2 | DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \ | ||
3 | allows programs to publish and discover services and hosts running on a local network \ | ||
4 | with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \ | ||
5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ | ||
6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ | ||
7 | server.' | ||
8 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
9 | HOMEPAGE = "http://avahi.org" | ||
10 | BUGTRACKER = "http://avahi.org/report" | ||
11 | SECTION = "network" | ||
12 | |||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | ||
14 | # python scripts are under GPLv2+ | ||
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
16 | |||
17 | INC_PR = "r7" | ||
18 | |||
19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" | ||
20 | |||
21 | SRC_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 | |||
30 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | ||
31 | USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \ | ||
32 | --no-create-home --shell /bin/false \ | ||
33 | --user-group avahi" | ||
34 | |||
35 | USERADD_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 | |||
41 | inherit autotools pkgconfig update-rc.d gettext useradd | ||
42 | |||
43 | EXTRA_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 | ||
59 | EXTRA_OECONF_SYSVINIT = "${@base_contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}" | ||
60 | EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}" | ||
61 | |||
62 | AVAHI_GTK ?= "--disable-gtk --disable-gtk3" | ||
63 | |||
64 | LDFLAGS_append_libc-uclibc = " -lintl" | ||
65 | LDFLAGS_append_uclinux-uclibc = " -lintl" | ||
66 | |||
67 | do_configure_prepend() { | ||
68 | sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac | ||
69 | } | ||
70 | |||
71 | |||
72 | PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils" | ||
73 | |||
74 | FILES_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" | ||
79 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | ||
80 | FILES_libavahi-core = "${libdir}/libavahi-core.so.*" | ||
81 | FILES_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" | ||
91 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | ||
92 | FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" | ||
93 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | ||
94 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ | ||
95 | ${sysconfdir}/init.d/avahi-dnsconfd" | ||
96 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | ||
97 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*" | ||
98 | FILES_avahi-utils = "${bindir}/avahi-*" | ||
99 | |||
100 | # uclibc has no nss | ||
101 | RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns" | ||
102 | RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns" | ||
103 | |||
104 | RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev" | ||
105 | RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev" | ||
106 | |||
107 | RRECOMMENDS_avahi-dev[nodeprrecs] = "1" | ||
108 | |||
109 | CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | ||
110 | |||
111 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" | ||
112 | INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" | ||
113 | INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" | ||
114 | INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd" | ||
115 | INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19" | ||
116 | |||
117 | do_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 | |||
136 | pkg_postinst_avahi-daemon () { | ||
137 | if [ -z "$D" ]; then | ||
138 | killall -q -HUP dbus-daemon || true | ||
139 | fi | ||
140 | } | ||
141 | |||
142 | pkg_postrm_avahi-daemon () { | ||
143 | deluser avahi || true | ||
144 | delgroup avahi || true | ||
145 | } | ||
146 | |||
147 | pkg_postrm_avahi-autoipd () { | ||
148 | deluser avahi-autoipd || true | ||
149 | delgroup avahi-autoipd || true | ||
150 | } | ||