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.inc86
1 files changed, 45 insertions, 41 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 24ea458e6e..a847394679 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -14,8 +14,9 @@ SECTION = "network"
14# python scripts are under GPLv2+ 14# python scripts are under GPLv2+
15LICENSE = "GPLv2+ & LGPLv2.1+" 15LICENSE = "GPLv2+ & LGPLv2.1+"
16 16
17X11DEPENDS = "gtk+ libglade" 17INC_PR = "r6"
18DEPENDS = "expat libcap libdaemon dbus glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" 18
19DEPENDS = "expat libcap libdaemon dbus glib-2.0"
19 20
20SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ 21SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
21 file://00avahi-autoipd \ 22 file://00avahi-autoipd \
@@ -25,58 +26,38 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
25inherit autotools pkgconfig update-rc.d gettext 26inherit autotools pkgconfig update-rc.d gettext
26 27
27EXTRA_OECONF = "--with-distro=debian \ 28EXTRA_OECONF = "--with-distro=debian \
29 --disable-introspection \
28 --with-avahi-priv-access-group=adm \ 30 --with-avahi-priv-access-group=adm \
29 --disable-stack-protector \ 31 --disable-stack-protector \
30 --disable-gdbm \ 32 --disable-gdbm \
31 --disable-mono \ 33 --disable-mono \
32 --disable-monodoc \ 34 --disable-monodoc \
33 --disable-gtk3 \
34 ${@base_contains('DISTRO_FEATURES', 'x11', '--enable-gtk', '--disable-gtk', d)} \
35 --disable-qt3 \ 35 --disable-qt3 \
36 --disable-qt4 \ 36 --disable-qt4 \
37 --disable-python \ 37 --disable-python \
38 --disable-doxygen-doc \ 38 --disable-doxygen-doc \
39 --with-systemdsystemunitdir=${base_libdir}/systemd/system/ \ 39 --with-systemdsystemunitdir=${base_libdir}/systemd/system/ \
40" 40 ${AVAHI_GTK} \
41 41 "
42PACKAGES =+ "avahi-systemd avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-gobject avahi-autoipd avahi-ui-utils avahi-utils libavahi-ui libavahi-ui-dev"
43 42
44FILES_avahi-systemd = "${base_libdir}/systemd" 43AVAHI_GTK ?= "--disable-gtk --disable-gtk3"
45RDEPENDS_avahi-systemd = "avahi-daemon"
46 44
47pkg_postinst_avahi-systemd() { 45LDFLAGS_append_libc-uclibc = " -lintl"
48 # can't do this offline 46LDFLAGS_append_uclinux-uclibc = " -lintl"
49 if [ "x$D" != "x" ]; then
50 exit 1
51 fi
52
53 systemctl enable avahi-daemon.service
54}
55
56pkg_postrm_avahi-systemd() {
57 # can't do this offline
58 if [ "x$D" != "x" ]; then
59 exit 1
60 fi
61 47
62 systemctl disable avahi-daemon.service 48do_configure_prepend() {
49 sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i configure.ac
63} 50}
64 51
65# uclibc has no nss
66RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns"
67RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns"
68 52
69RDEPENDS_avahi-daemon = "sysvinit-pidof" 53PACKAGES =+ "avahi-systemd avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
70 54
55FILES_avahi-systemd = "${base_libdir}/systemd"
71FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ 56FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
72 ${sysconfdir}/avahi/avahi-autoipd.action \ 57 ${sysconfdir}/avahi/avahi-autoipd.action \
73 ${sysconfdir}/dhcp3/*/avahi-autoipd" 58 ${sysconfdir}/dhcp3/*/avahi-autoipd"
74FILES_libavahi-common = "${libdir}/libavahi-common.so.*" 59FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
75FILES_libavahi-core = "${libdir}/libavahi-core.so.*" 60FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
76FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
77FILES_libavahi-ui-dev = "${libdir}/libavahi-ui.* \
78 ${includedir}/avahi-ui/* \
79 ${libdir}/pkgconfig/avahi-ui.pc"
80FILES_avahi-daemon = "${sbindir}/avahi-daemon \ 61FILES_avahi-daemon = "${sbindir}/avahi-daemon \
81 ${sysconfdir}/avahi/avahi-daemon.conf \ 62 ${sysconfdir}/avahi/avahi-daemon.conf \
82 ${sysconfdir}/avahi/hosts \ 63 ${sysconfdir}/avahi/hosts \
@@ -88,16 +69,19 @@ FILES_avahi-daemon = "${sbindir}/avahi-daemon \
88 ${datadir}/avahi/service-types \ 69 ${datadir}/avahi/service-types \
89 ${datadir}/dbus-1/system-services" 70 ${datadir}/dbus-1/system-services"
90FILES_libavahi-client = "${libdir}/libavahi-client.so.*" 71FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
72FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
91FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ 73FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
92 ${sysconfdir}/avahi/avahi-dnsconfd.action \ 74 ${sysconfdir}/avahi/avahi-dnsconfd.action \
93 ${sysconfdir}/init.d/avahi-dnsconfd" 75 ${sysconfdir}/init.d/avahi-dnsconfd"
94FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" 76FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
95FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*" 77FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
96FILES_avahi-utils = "${bindir}/avahi-*" 78FILES_avahi-utils = "${bindir}/avahi-*"
97FILES_avahi-ui-utils = "${bindir}/bssh ${bindir}/bvnc ${bindir}/bshell \ 79
98 ${bindir}/avahi-discover-standalone \ 80RDEPENDS_avahi-daemon = "sysvinit-pidof"
99 ${datadir}/applications \ 81
100 ${datadir}/avahi/interfaces" 82# uclibc has no nss
83RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns"
84RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns"
101 85
102RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev" 86RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
103RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev" 87RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
@@ -119,6 +103,14 @@ do_install() {
119 # /var/run of current version is empty, so just remove it. 103 # /var/run of current version is empty, so just remove it.
120 # if /var/run become non-empty in the future, need to install it via volatile 104 # if /var/run become non-empty in the future, need to install it via volatile
121 rm -rf ${D}/var/run 105 rm -rf ${D}/var/run
106 rm -rf ${D}${datadir}/dbus-1/interfaces
107}
108
109do_install_avahi-autoipd() {
110 autotools_do_install
111 install -d ${D}${sysconfdir}/udhcpc.d
112 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
113 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
122} 114}
123 115
124# At the time the postinst runs, dbus might not be setup so only restart if running 116# At the time the postinst runs, dbus might not be setup so only restart if running
@@ -157,9 +149,21 @@ pkg_postrm_avahi-autoipd () {
157 delgroup avahi-autoipd || true 149 delgroup avahi-autoipd || true
158} 150}
159 151
160do_install_avahi-autoipd() { 152pkg_postinst_avahi-systemd() {
161 autotools_do_install 153 # can't do this offline
162 install -d ${D}${sysconfdir}/udhcpc.d 154 if [ "x$D" != "x" ]; then
163 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d 155 exit 1
164 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d 156 fi
157
158 systemctl enable avahi-daemon.service
165} 159}
160
161pkg_postrm_avahi-systemd() {
162 # can't do this offline
163 if [ "x$D" != "x" ]; then
164 exit 1
165 fi
166
167 systemctl disable avahi-daemon.service
168}
169