blob: 039c44354e59f9c59151727a0bcc6aadb973e710 [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 \
21 file://bluetooth.conf \
22"
23S = "${WORKDIR}/bluez-${PV}"
24
25inherit autotools-brokensep pkgconfig systemd
26
27EXTRA_OECONF = "\
28 --enable-tools \
29 --disable-cups \
30 --enable-test \
31 --enable-datafiles \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
33 --enable-library \
34"
35
36# bluez5 builds a large number of useful utilities but does not
37# install them. Specify which ones we want put into ${PN}-noinst-tools.
38NOINST_TOOLS_READLINE ??= ""
39NOINST_TOOLS_EXPERIMENTAL ??= ""
40NOINST_TOOLS = " \
41 ${NOINST_TOOLS_READLINE} \
42 ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
43"
44
45do_install_append() {
46 install -d ${D}${sysconfdir}/bluetooth/
47 if [ -f ${S}/profiles/audio/audio.conf ]; then
48 install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
49 fi
50 if [ -f ${S}/profiles/network/network.conf ]; then
51 install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
52 fi
53 if [ -f ${S}/profiles/input/input.conf ]; then
54 install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
55 fi
56 # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
57 install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
58
59 # Install desired tools that upstream leaves in build area
60 for f in ${NOINST_TOOLS} ; do
61 install -m 755 ${B}/$f ${D}/${bindir}
62 done
63}
64
65ALLOW_EMPTY_libasound-module-bluez = "1"
66PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
67
68FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
69FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
70FILES_${PN}-dev += "\
71 ${libdir}/bluetooth/plugins/*.la \
72 ${libdir}/alsa-lib/*.la \
73"
74
75FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \
76 ${exec_prefix}/lib/systemd/user/obex.service \
77 ${datadir}/dbus-1/services/org.bluez.obex.service \
78 "
79SYSTEMD_SERVICE_${PN}-obex = "obex.service"
80
81FILES_${PN}-testtools = "${libdir}/bluez/test/*"
82
83def get_noinst_tools_paths (d, bb, tools):
84 s = list()
85 bindir = d.getVar("bindir", True)
86 for bdp in tools.split():
87 f = os.path.basename(bdp)
88 s.append("%s/%s" % (bindir, f))
89 return "\n".join(s)
90
91FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
92
93FILES_${PN}-dbg += "\
94 ${libexecdir}/bluetooth/.debug \
95 ${libdir}/bluetooth/plugins/.debug \
96 ${libdir}/*/.debug \
97 */udev/.debug \
98 */*/udev/.debug \
99 "
100
101RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
102
103SYSTEMD_SERVICE_${PN} = "bluetooth.service"
104
105EXCLUDE_FROM_WORLD = "1"