blob: df42c88b9da3cd604c9eed9c429ba883d96705f3 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Linux Bluetooth Stack Userland V5"
2DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries."
3HOMEPAGE = "http://www.bluez.org"
4SECTION = "libs"
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
8 file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
9DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
10PROVIDES += "bluez-hcidump"
11RPROVIDES_${PN} += "bluez-hcidump"
12
13RCONFLICTS_${PN} = "bluez4"
14
15PACKAGECONFIG ??= "obex-profiles"
16PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
17PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
18
19SRC_URI = "\
20 ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021"
22S = "${WORKDIR}/bluez-${PV}"
23
24inherit autotools-brokensep pkgconfig systemd
25
26EXTRA_OECONF = "\
27 --enable-tools \
28 --disable-cups \
29 --enable-test \
30 --enable-datafiles \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
32 --enable-library \
33"
34
35# bluez5 builds a large number of useful utilities but does not
36# install them. Specify which ones we want put into ${PN}-noinst-tools.
37NOINST_TOOLS_READLINE ??= ""
38NOINST_TOOLS_EXPERIMENTAL ??= ""
39NOINST_TOOLS = " \
40 ${NOINST_TOOLS_READLINE} \
41 ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
42"
43
44do_install_append() {
45 install -d ${D}${sysconfdir}/bluetooth/
46 if [ -f ${S}/profiles/audio/audio.conf ]; then
47 install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
48 fi
49 if [ -f ${S}/profiles/network/network.conf ]; then
50 install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
51 fi
52 if [ -f ${S}/profiles/input/input.conf ]; then
53 install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
54 fi
Patrick Williamsf1e5d692016-03-30 15:21:19 -050055
56 install -m 0644 ${S}/src/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057
58 # Install desired tools that upstream leaves in build area
59 for f in ${NOINST_TOOLS} ; do
60 install -m 755 ${B}/$f ${D}/${bindir}
61 done
62}
63
64ALLOW_EMPTY_libasound-module-bluez = "1"
65PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
66
67FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
68FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
69FILES_${PN}-dev += "\
70 ${libdir}/bluetooth/plugins/*.la \
71 ${libdir}/alsa-lib/*.la \
72"
73
74FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \
75 ${exec_prefix}/lib/systemd/user/obex.service \
76 ${datadir}/dbus-1/services/org.bluez.obex.service \
77 "
78SYSTEMD_SERVICE_${PN}-obex = "obex.service"
79
80FILES_${PN}-testtools = "${libdir}/bluez/test/*"
81
82def get_noinst_tools_paths (d, bb, tools):
83 s = list()
84 bindir = d.getVar("bindir", True)
85 for bdp in tools.split():
86 f = os.path.basename(bdp)
87 s.append("%s/%s" % (bindir, f))
88 return "\n".join(s)
89
90FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
91
92FILES_${PN}-dbg += "\
93 ${libexecdir}/bluetooth/.debug \
94 ${libdir}/bluetooth/plugins/.debug \
95 ${libdir}/*/.debug \
96 */udev/.debug \
97 */*/udev/.debug \
98 "
99
100RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
101
102SYSTEMD_SERVICE_${PN} = "bluetooth.service"
103
104EXCLUDE_FROM_WORLD = "1"