diff options
author | Saul Wold <sgw@linux.intel.com> | 2011-09-20 08:14:46 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-21 13:42:51 +0100 |
commit | 59a08907eafffde664079b9a2068f47131dd3f5d (patch) | |
tree | ba33cad748845e3a55342872e3ee3adeb41fb5f9 | |
parent | efc88ff0108e15b464c849a061406783c1fb0a39 (diff) | |
download | poky-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>
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi-ui_0.6.30.bb | 37 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 86 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi_0.6.30.bb | 6 |
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 @@ | |||
1 | LIC_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 | |||
7 | require avahi.inc | ||
8 | |||
9 | PR = "${INC_PR}.0" | ||
10 | |||
11 | DEPENDS += "avahi gtk+ libglade" | ||
12 | |||
13 | AVAHI_GTK = "--enable-gtk --disable-gtk3" | ||
14 | |||
15 | S = "${WORKDIR}/avahi-${PV}" | ||
16 | |||
17 | PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev python-avahi avahi-discover avahi-discover-standalone" | ||
18 | |||
19 | FILES_${PN} = "${libdir}/libavahi-ui*.so.*" | ||
20 | FILES_${PN}-dbg += "${libdir}/.debug/libavah-ui*" | ||
21 | FILES_${PN}-dev += "${libdir}/libavahi-ui*" | ||
22 | |||
23 | FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*" | ||
24 | |||
25 | FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi/*" | ||
26 | FILES_avahi-discover = "${bindir}/avahi-discover \ | ||
27 | ${datadir}/applications/avahi-discover.desktop \ | ||
28 | ${datadir}/avahi/interfaces/avahi-discover.glade" | ||
29 | FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \ | ||
30 | ${datadir}/avahi/interfaces/avahi-discover.glade" | ||
31 | |||
32 | RDEPENDS_avahi-discover = "python-avahi python-pygtk" | ||
33 | RDEPENDS_python-avahi = "python-dbus" | ||
34 | |||
35 | |||
36 | SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43" | ||
37 | SRC_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+ |
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 | |||
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 | ||
9 | PR = "r4" | 9 | PR = "${INC_PR}.0" |
10 | |||
11 | DEPENDS += "intltool-native" | ||
12 | |||
13 | PACKAGES =+ "libavahi-gobject" | ||
10 | 14 | ||
11 | SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43" | 15 | SRC_URI[md5sum] = "e4db89a2a403ff4c47d66ac66fad1f43" |
12 | SRC_URI[sha256sum] = "f9e4316c2339d0020726edd846d01bee0c39980906db0c247479e5807457ff1f" | 16 | SRC_URI[sha256sum] = "f9e4316c2339d0020726edd846d01bee0c39980906db0c247479e5807457ff1f" |