diff options
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi.inc')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 86 |
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+ |
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | 15 | LICENSE = "GPLv2+ & LGPLv2.1+" |
16 | 16 | ||
17 | X11DEPENDS = "gtk+ libglade" | 17 | INC_PR = "r6" |
18 | DEPENDS = "expat libcap libdaemon dbus glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" | 18 | |
19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" | ||
19 | 20 | ||
20 | SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | 21 | SRC_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 \ | |||
25 | inherit autotools pkgconfig update-rc.d gettext | 26 | inherit autotools pkgconfig update-rc.d gettext |
26 | 27 | ||
27 | EXTRA_OECONF = "--with-distro=debian \ | 28 | EXTRA_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 | " | |
42 | PACKAGES =+ "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 | ||
44 | FILES_avahi-systemd = "${base_libdir}/systemd" | 43 | AVAHI_GTK ?= "--disable-gtk --disable-gtk3" |
45 | RDEPENDS_avahi-systemd = "avahi-daemon" | ||
46 | 44 | ||
47 | pkg_postinst_avahi-systemd() { | 45 | LDFLAGS_append_libc-uclibc = " -lintl" |
48 | # can't do this offline | 46 | LDFLAGS_append_uclinux-uclibc = " -lintl" |
49 | if [ "x$D" != "x" ]; then | ||
50 | exit 1 | ||
51 | fi | ||
52 | |||
53 | systemctl enable avahi-daemon.service | ||
54 | } | ||
55 | |||
56 | pkg_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 | 48 | do_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 | ||
66 | RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns" | ||
67 | RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns" | ||
68 | 52 | ||
69 | RDEPENDS_avahi-daemon = "sysvinit-pidof" | 53 | PACKAGES =+ "avahi-systemd avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils" |
70 | 54 | ||
55 | FILES_avahi-systemd = "${base_libdir}/systemd" | ||
71 | FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ | 56 | FILES_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" |
74 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | 59 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" |
75 | FILES_libavahi-core = "${libdir}/libavahi-core.so.*" | 60 | FILES_libavahi-core = "${libdir}/libavahi-core.so.*" |
76 | FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" | ||
77 | FILES_libavahi-ui-dev = "${libdir}/libavahi-ui.* \ | ||
78 | ${includedir}/avahi-ui/* \ | ||
79 | ${libdir}/pkgconfig/avahi-ui.pc" | ||
80 | FILES_avahi-daemon = "${sbindir}/avahi-daemon \ | 61 | FILES_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" |
90 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | 71 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" |
72 | FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" | ||
91 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | 73 | FILES_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" |
94 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | 76 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" |
95 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*" | 77 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*" |
96 | FILES_avahi-utils = "${bindir}/avahi-*" | 78 | FILES_avahi-utils = "${bindir}/avahi-*" |
97 | FILES_avahi-ui-utils = "${bindir}/bssh ${bindir}/bvnc ${bindir}/bshell \ | 79 | |
98 | ${bindir}/avahi-discover-standalone \ | 80 | RDEPENDS_avahi-daemon = "sysvinit-pidof" |
99 | ${datadir}/applications \ | 81 | |
100 | ${datadir}/avahi/interfaces" | 82 | # uclibc has no nss |
83 | RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns" | ||
84 | RRECOMMENDS_${PN}_append_libc-glibc = "libnss-mdns" | ||
101 | 85 | ||
102 | RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev" | 86 | RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev" |
103 | RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev" | 87 | RRECOMMENDS_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 | |||
109 | do_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 | ||
160 | do_install_avahi-autoipd() { | 152 | pkg_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 | |||
161 | pkg_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 | |||