1SUMMARY = "Bluetooth Audio ALSA Backend"
2HOMEPAGE = "https://github.com/Arkq/bluez-alsa"
3SECTION = "libs"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=8449a4f133a93f6254b496d4fb476e83"
7
8SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master"
9
10SRCREV = "dd05a1baa261b94da9ba977b5e3392c8b4dc7a5e"
11PV = "4.0.0+git"
12
13S  = "${WORKDIR}/git"
14
15DEPENDS += "alsa-lib bluez5 dbus glib-2.0 sbc"
16
17PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
18PACKAGECONFIG[a2dpconf]  = "--enable-a2dpconf,--disable-a2dpconf"
19PACKAGECONFIG[aac]  = "--enable-aac,--disable-aac,fdk-aac"
20PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay"
21PACKAGECONFIG[cli] = "--enable-cli,--disable-cli"
22PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,lcov-native"
23PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
24PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time"
25PACKAGECONFIG[faststream] = "--enable-faststream,--disable-faststream"
26PACKAGECONFIG[hcitop] = "--enable-hcitop,--disable-hcitop,libbsd ncurses"
27PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
28PACKAGECONFIG[mp3lame] = "--enable-mp3lame,--disable-mp3lame,lame"
29PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123,mpg123"
30PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono,ofono"
31PACKAGECONFIG[payloadcheck] = "--enable-payloadcheck,--disable-payloadcheck"
32PACKAGECONFIG[rfcomm] = "--enable-rfcomm,--disable-rfcomm"
33PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} \
34                          --with-systemdbluealsaargs='${SYSTEMD_BLUEALSA_ARGS}' --with-systemdbluealsaaplayargs='${SYSTEMD_BLUEALSA_APLAY_ARGS}',--disable-systemd,systemd"
35PACKAGECONFIG[test] = "--enable-test,--disable-test,libcheck libsndfile1"
36PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,,upower"
37
38inherit autotools pkgconfig systemd
39
40EXTRA_OECONF = " \
41    --disable-aptx \
42    --disable-lc3plus \
43    --disable-ldac \
44    --disable-manpages \
45"
46
47PACKAGE_BEFORE_PN = "${PN}-aplay"
48RRECOMMENDS:${PN} = "${PN}-aplay"
49
50FILES:${PN}-aplay = "${bindir}/bluealsa-aplay"
51FILES:${PN} += "${libdir}/alsa-lib/*"
52
53SYSTEMD_PACKAGES += "${PN}-aplay"
54SYSTEMD_SERVICE:${PN} = "bluealsa.service"
55SYSTEMD_SERVICE:${PN}-aplay = "bluealsa-aplay.service"
56
57SYSTEMD_AUTO_ENABLE:${PN}-aplay = "disable"
58
59# Choose bluez-alsa arguments to be used in bluealsa systemd service
60# Usually could choose profiles with it: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono
61# Enable bluez-alsa arguments by default:
62SYSTEMD_BLUEALSA_ARGS ?= "-p a2dp-source -p a2dp-sink"
63
64# Choose bluealsa-aplay arguments to be used in bluealsa-aplay systemd service
65# Defaults to be empty:
66SYSTEMD_BLUEALSA_APLAY_ARGS ?= ""
67