summaryrefslogtreecommitdiff
path: root/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/bluez-alsa/bluez-alsa_git.bb')
-rw-r--r--recipes-connectivity/bluez-alsa/bluez-alsa_git.bb83
1 files changed, 49 insertions, 34 deletions
diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
index 085792d..62ff3d6 100644
--- a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
+++ b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
@@ -3,45 +3,60 @@ HOMEPAGE = "https://github.com/Arkq/bluez-alsa"
SECTION = "libs"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bb3e99e80c5d718213f35ae1def4c106"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=72d868d66bdd5bf51fe67734431de057"
-SRC_URI = " \
- git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master \
- file://0001-Fix-linkage-mark-external-variable-as-extern.patch \
-"
+SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master"
-SRCREV = "9045edb436ea755f395a2e09e4525b5defad286a"
-
-SRC_URI += "file://bluez-alsa.service"
+SRCREV = "c9e122547b2ba65ccc16d972a66d2d56ca2f2fe5"
+PV = "3.1.0+git${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS += "alsa-lib bluez5 systemd glib-2.0 sbc"
-
-PACKAGECONFIG[aac] = "--enable-aac, --disable-aac, "
-PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx,"
-PACKAGECONFIG[hcitop] = "--enable-hcitop, --disable-hcitop, libbsd ncurses"
-
-inherit autotools pkgconfig
-inherit systemd
-
-SYSTEMD_AUTO_ENABLE = "enable"
-SYSTEMD_SERVICE_${PN} = "bluez-alsa.service"
-
-PACKAGECONFIG += "hcitop"
+DEPENDS += "alsa-lib bluez5 glib-2.0 sbc"
+
+PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[a2dpconf] = "--enable-a2dpconf,--disable-a2dpconf"
+PACKAGECONFIG[aac] = "--enable-aac,--disable-aac"
+PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay"
+PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx"
+PACKAGECONFIG[cli] = "--enable-cli,--disable-cli"
+PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,,lcov"
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time"
+PACKAGECONFIG[faststream] = "--enable-faststream,--disable-faststream"
+PACKAGECONFIG[hcitop] = "--enable-hcitop,--disable-hcitop,libbsd ncurses"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[mp3lame] = "--enable-mp3lame,--disable-mp3lame,lame"
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123,mpg123"
+PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono,ofono"
+PACKAGECONFIG[payloadcheck] = "--enable-payloadcheck,--disable-payloadcheck"
+PACKAGECONFIG[rfcomm] = "--enable-rfcomm,--disable-rfcomm"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd,systemd dbus"
+PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,,upower"
+
+inherit autotools pkgconfig systemd
+
+PACKAGE_BEFORE_PN = "${PN}-aplay"
+RRECOMMENDS_${PN} = "${PN}-aplay"
+
+FILES_${PN}-aplay = "${bindir}/bluealsa-aplay"
+FILES_${PN} += "${libdir}/alsa-lib/*"
+
+SYSTEMD_PACKAGES += "${PN}-aplay"
+SYSTEMD_SERVICE_${PN} = "bluealsa.service"
+SYSTEMD_SERVICE_${PN}-aplay = "bluealsa-aplay.service"
+
+SYSTEMD_AUTO_ENABLE_${PN}-aplay = "disable"
+
+# Choose bluez-alsa profiles to be used at runtime
+# Supported profiles: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono
+# Enable output profiles by default
+BLUEZ_ALSA_OPTS ?= "-p a2dp-source -p a2dp-sink -p hfp-ag -p hsp-ag"
do_install_append () {
- install -d ${D}${base_libdir}/systemd/system
- install -m 0644 ${WORKDIR}/bluez-alsa.service ${D}${base_libdir}/systemd/system
-}
+ # OE specific, it's bluetooth.service being used instead of bluez.service
+ sed -i -e 's#After=bluez.service#After=bluetooth.service#' ${D}${systemd_system_unitdir}/bluealsa.service
-FILES_${PN} += "\
- ${datadir}/alsa/alsa.conf.d/20-bluealsa.conf\
- ${libdir}/alsa-lib/libasound_module_ctl_bluealsa.so\
- ${libdir}/alsa-lib/libasound_module_pcm_bluealsa.so\
-"
-
-FILES_${PN}-staticdev += "\
- ${libdir}/alsa-lib/libasound_module_ctl_bluealsa.a\
- ${libdir}/alsa-lib/libasound_module_pcm_bluealsa.a\
-"
+ # Set profiles
+ sed -i -e 's#ExecStart=.*$#ExecStart=${bindir}/bluealsa ${BLUEZ_ALSA_OPTS}#' ${D}${systemd_system_unitdir}/bluealsa.service
+}