1 SUMMARY = "Linux Bluetooth Stack Userland V5"
2 DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries."
3 HOMEPAGE = "http://www.bluez.org"
5 LICENSE = "GPLv2+ & LGPLv2.1+"
6 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
8 file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
9 DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
10 PROVIDES += "bluez-hcidump"
11 RPROVIDES_${PN} += "bluez-hcidump"
13 RCONFLICTS_${PN} = "bluez4"
15 PACKAGECONFIG ??= "obex-profiles"
16 PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
17 PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
20 git://git.kernel.org/pub/scm/bluetooth/bluez.git;protocol=https;branch=master \
21 file://out-of-tree.patch \
24 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
25 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
26 file://bluetooth.conf \
28 SRCREV = "c64b4d9e8dc3e36672061f39a9dba19ad0fb1ef1"
31 inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
38 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
42 # bluez5 builds a large number of useful utilities but does not
43 # install them. Specify which ones we want put into ${PN}-noinst-tools.
44 NOINST_TOOLS_READLINE ??= ""
45 NOINST_TOOLS_EXPERIMENTAL ??= ""
47 ${NOINST_TOOLS_READLINE} \
48 ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
52 install -d ${D}${INIT_D_DIR}
53 install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
55 install -d ${D}${sysconfdir}/bluetooth/
56 if [ -f ${S}/profiles/audio/audio.conf ]; then
57 install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
59 if [ -f ${S}/profiles/network/network.conf ]; then
60 install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
62 if [ -f ${S}/profiles/input/input.conf ]; then
63 install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
66 install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf
68 if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
69 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
72 # Install desired tools that upstream leaves in build area
73 for f in ${NOINST_TOOLS} ; do
74 install -m 755 ${B}/$f ${D}/${bindir}
78 ALLOW_EMPTY_libasound-module-bluez = "1"
79 PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
81 FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
82 FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
84 ${libdir}/bluetooth/plugins/*.la \
85 ${libdir}/alsa-lib/*.la \
88 FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \
89 ${exec_prefix}/lib/systemd/user/obex.service \
90 ${datadir}/dbus-1/services/org.bluez.obex.service \
92 SYSTEMD_SERVICE_${PN}-obex = "obex.service"
94 FILES_${PN}-testtools = "${libdir}/bluez/test/*"
96 def get_noinst_tools_paths (d, bb, tools):
98 bindir = d.getVar("bindir", True)
99 for bdp in tools.split():
100 f = os.path.basename(bdp)
101 s.append("%s/%s" % (bindir, f))
104 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
106 RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
108 SYSTEMD_SERVICE_${PN} = "bluetooth.service"
109 INITSCRIPT_PACKAGES = "${PN}"
110 INITSCRIPT_NAME_${PN} = "bluetooth"
112 EXCLUDE_FROM_WORLD = "1"
115 oe_runmake buildtests
119 cp -r ${B}/unit/ ${D}${PTEST_PATH}
120 rm -f ${D}${PTEST_PATH}/unit/*.o