summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-09-20 08:14:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 13:42:51 +0100
commit59a08907eafffde664079b9a2068f47131dd3f5d (patch)
treeba33cad748845e3a55342872e3ee3adeb41fb5f9 /meta/recipes-connectivity
parentefc88ff0108e15b464c849a061406783c1fb0a39 (diff)
downloadpoky-59a08907eafffde664079b9a2068f47131dd3f5d.tar.gz
avahi: Refactor recipe to move UI to avahi-ui
[YOCTO #1492] This patch refactors avahi into a core non ui and avahi-ui, OE-Classic has a similar factoring, and it was used as a refernce to make this occur correctly here. This allows the package to be built without gtk and GPLv3 issues. (From OE-Core rev: a3909a6a42a1e3e80b7f2597f95ecb7db2814d2d) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.6.30.bb37
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc86
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.6.30.bb6
3 files changed, 87 insertions, 42 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.6.30.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.30.bb
new file mode 100644
index 0000000000..e0733a99fa
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.6.30.bb
@@ -0,0 +1,37 @@
1LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
2 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
3 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
4 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
5 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
6
7require avahi.inc
8
9PR = "${INC_PR}.0"
10
11DEPENDS += "avahi gtk+ libglade"
12
13AVAHI_GTK = "--enable-gtk --disable-gtk3"
14
15S = "${WORKDIR}/avahi-${PV}"
16
17PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev python-avahi avahi-discover avahi-discover-standalone"
18
19FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
20FILES_${PN}-dbg += "${libdir}/.debug/libavah-ui*"
21FILES_${PN}-dev += "${libdir}/libavahi-ui*"
22
23FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
24
25FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi/*"
26FILES_avahi-discover = "${bindir}/avahi-discover \
27 ${datadir}/applications/avahi-discover.desktop \
28 ${datadir}/avahi/interfaces/avahi-discover.glade"
29FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \
30 ${datadir}/avahi/interfaces/avahi-discover.glade"
31
32RDEPENDS_avahi-discover = "python-avahi python-pygtk"
33RDEPENDS_python-avahi = "python-dbus"
34
35
36SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43"
37SRC_URI[sha256sum] = "f9e4316c2339d0020726edd846d01bee0c39980906db0c247479e5807457ff1f"
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
diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
index 05716d0699..692a5df9a3 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.6.30.bb
@@ -6,7 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
6 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ 6 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
7 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" 7 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
8 8
9PR = "r4" 9PR = "${INC_PR}.0"
10
11DEPENDS += "intltool-native"
12
13PACKAGES =+ "libavahi-gobject"
10 14
11SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43" 15SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43"
12SRC_URI[sha256sum] = "f9e4316c2339d0020726edd846d01bee0c39980906db0c247479e5807457ff1f" 16SRC_URI[sha256sum] = "f9e4316c2339d0020726edd846d01bee0c39980906db0c247479e5807457ff1f"