summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bluez5/bluez5.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bluez5/bluez5.inc')
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc46
1 files changed, 22 insertions, 24 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index 4c1156c67c..a31d7076ba 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -2,15 +2,16 @@ SUMMARY = "Linux Bluetooth Stack Userland V5"
2DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." 2DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries."
3HOMEPAGE = "http://www.bluez.org" 3HOMEPAGE = "http://www.bluez.org"
4SECTION = "libs" 4SECTION = "libs"
5LICENSE = "GPLv2+ & LGPLv2.1+" 5LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ 7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
8 file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" 8 file://src/main.c;beginline=1;endline=24;md5=0ad83ca0dc37ab08af448777c581e7ac"
9DEPENDS = "dbus glib-2.0" 9DEPENDS = "dbus glib-2.0"
10RDEPENDS:${PN} += "dbus"
10PROVIDES += "bluez-hcidump" 11PROVIDES += "bluez-hcidump"
11RPROVIDES_${PN} += "bluez-hcidump" 12RPROVIDES:${PN} += "bluez-hcidump"
12 13
13RCONFLICTS_${PN} = "bluez4" 14RCONFLICTS:${PN} = "bluez4"
14 15
15PACKAGECONFIG ??= "obex-profiles \ 16PACKAGECONFIG ??= "obex-profiles \
16 readline \ 17 readline \
@@ -45,6 +46,7 @@ PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
45PACKAGECONFIG[mesh] = "--enable-mesh --enable-external-ell,--disable-mesh, json-c ell" 46PACKAGECONFIG[mesh] = "--enable-mesh --enable-external-ell,--disable-mesh, json-c ell"
46PACKAGECONFIG[btpclient] = "--enable-btpclient --enable-external-ell,--disable-btpclient, ell" 47PACKAGECONFIG[btpclient] = "--enable-btpclient --enable-external-ell,--disable-btpclient, ell"
47PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" 48PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
49PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,python3-docutils-native"
48 50
49SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ 51SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
50 file://init \ 52 file://init \
@@ -52,6 +54,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
52 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ 54 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
53 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ 55 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
54 file://0001-test-gatt-Fix-hung-issue.patch \ 56 file://0001-test-gatt-Fix-hung-issue.patch \
57 file://0004-src-shared-util.c-include-linux-limits.h.patch \
55 " 58 "
56S = "${WORKDIR}/bluez-${PV}" 59S = "${WORKDIR}/bluez-${PV}"
57 60
@@ -63,9 +66,12 @@ EXTRA_OECONF = "\
63 --enable-test \ 66 --enable-test \
64 --enable-datafiles \ 67 --enable-datafiles \
65 --enable-library \ 68 --enable-library \
69 --enable-pie \
66 --without-zsh-completion-dir \ 70 --without-zsh-completion-dir \
67" 71"
68 72
73CFLAGS += "-DFIRMWARE_DIR=\\"${nonarch_base_libdir}/firmware\\""
74
69# bluez5 builds a large number of useful utilities but does not 75# bluez5 builds a large number of useful utilities but does not
70# install them. Specify which ones we want put into ${PN}-noinst-tools. 76# install them. Specify which ones we want put into ${PN}-noinst-tools.
71NOINST_TOOLS_READLINE ??= "" 77NOINST_TOOLS_READLINE ??= ""
@@ -77,18 +83,10 @@ NOINST_TOOLS = " \
77 ${@bb.utils.contains('PACKAGECONFIG', 'tools', '${NOINST_TOOLS_BT}', '', d)} \ 83 ${@bb.utils.contains('PACKAGECONFIG', 'tools', '${NOINST_TOOLS_BT}', '', d)} \
78" 84"
79 85
80do_install_append() { 86do_install:append() {
81 install -d ${D}${INIT_D_DIR} 87 install -d ${D}${INIT_D_DIR}
82 install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth 88 install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
83 89
84 install -d ${D}${sysconfdir}/bluetooth/
85 if [ -f ${S}/profiles/network/network.conf ]; then
86 install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
87 fi
88 if [ -f ${S}/profiles/input/input.conf ]; then
89 install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
90 fi
91
92 if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then 90 if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
93 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth 91 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
94 fi 92 fi
@@ -105,25 +103,25 @@ do_install_append() {
105 103
106PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools" 104PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
107 105
108FILES_${PN} += " \ 106FILES:${PN} += " \
109 ${libdir}/bluetooth/plugins/*.so \ 107 ${libdir}/bluetooth/plugins/*.so \
110 ${systemd_unitdir}/ ${datadir}/dbus-1 \ 108 ${systemd_unitdir}/ ${datadir}/dbus-1 \
111 ${libdir}/cups \ 109 ${libdir}/cups \
112" 110"
113FILES_${PN}-dev += " \ 111FILES:${PN}-dev += " \
114 ${libdir}/bluetooth/plugins/*.la \ 112 ${libdir}/bluetooth/plugins/*.la \
115" 113"
116 114
117FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \ 115FILES:${PN}-obex = "${libexecdir}/bluetooth/obexd \
118 ${exec_prefix}/lib/systemd/user/obex.service \ 116 ${exec_prefix}/lib/systemd/user/obex.service \
119 ${systemd_system_unitdir}/obex.service \ 117 ${systemd_system_unitdir}/obex.service \
120 ${sysconfdir}/systemd/system/multi-user.target.wants/obex.service \ 118 ${sysconfdir}/systemd/system/multi-user.target.wants/obex.service \
121 ${datadir}/dbus-1/services/org.bluez.obex.service \ 119 ${datadir}/dbus-1/services/org.bluez.obex.service \
122 ${sysconfdir}/dbus-1/system.d/obexd.conf \ 120 ${sysconfdir}/dbus-1/system.d/obexd.conf \
123 " 121 "
124SYSTEMD_SERVICE_${PN}-obex = "obex.service" 122SYSTEMD_SERVICE:${PN}-obex = "obex.service"
125 123
126FILES_${PN}-testtools = "${libdir}/bluez/test/*" 124FILES:${PN}-testtools = "${libdir}/bluez/test/*"
127 125
128def get_noinst_tools_paths (d, bb, tools): 126def get_noinst_tools_paths (d, bb, tools):
129 s = list() 127 s = list()
@@ -133,14 +131,14 @@ def get_noinst_tools_paths (d, bb, tools):
133 s.append("%s/%s" % (bindir, f)) 131 s.append("%s/%s" % (bindir, f))
134 return "\n".join(s) 132 return "\n".join(s)
135 133
136FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}" 134FILES:${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}"
137 135
138RDEPENDS_${PN}-testtools += "python3-core python3-dbus" 136RDEPENDS:${PN}-testtools += "python3-core python3-dbus"
139RDEPENDS_${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}" 137RDEPENDS:${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
140 138
141SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}" 139SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
142INITSCRIPT_PACKAGES = "${PN}" 140INITSCRIPT_PACKAGES = "${PN}"
143INITSCRIPT_NAME_${PN} = "bluetooth" 141INITSCRIPT_NAME:${PN} = "bluetooth"
144 142
145do_compile_ptest() { 143do_compile_ptest() {
146 oe_runmake buildtests 144 oe_runmake buildtests
@@ -151,4 +149,4 @@ do_install_ptest() {
151 rm -f ${D}${PTEST_PATH}/unit/*.o 149 rm -f ${D}${PTEST_PATH}/unit/*.o
152} 150}
153 151
154RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-utf-16" 152RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-utf-16"