2022-11-08 21:17:24 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
|
|
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
# Copyright (C) 2022-present Fewtarius
|
|
|
|
|
|
|
|
PKG_NAME="bluez-alsa"
|
|
|
|
PKG_VERSION="4.0.0"
|
|
|
|
PKG_SHA256="ce5e060e61669d61d44f5f9bad34a7b88378376e9d49d31482406a68127a6b29"
|
|
|
|
PKG_LICENSE="GPL"
|
|
|
|
PKG_SITE="https://github.com/Arkq/bluez-alsa"
|
|
|
|
PKG_URL="https://github.com/Arkq/bluez-alsa/archive/refs/tags/v${PKG_VERSION}.tar.gz"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain alsa-lib bluez sbc dbus libopenaptx"
|
|
|
|
PKG_LONGDESC="Bluetooth audio ALSA backend"
|
|
|
|
PKG_TOOLCHAIN="autotools"
|
|
|
|
|
2022-11-10 21:39:25 +00:00
|
|
|
if build_with_debug; then
|
|
|
|
PKG_BLUEALSA_DEBUG=--with-debug
|
|
|
|
fi
|
|
|
|
|
|
|
|
PKG_CONFIGURE_OPTS_TARGET="${PKG_BLUEALSA_DEBUG} \
|
|
|
|
--enable-aptx \
|
2022-11-08 21:17:24 +00:00
|
|
|
--with-libopenaptx \
|
|
|
|
--enable-upower \
|
|
|
|
--enable-a2dpconf \
|
2022-11-10 21:39:25 +00:00
|
|
|
--enable-cli \
|
|
|
|
--enable-systemd"
|
2022-11-08 21:17:24 +00:00
|
|
|
|
|
|
|
post_makeinstall_target() {
|
|
|
|
# workaround until I figure out how to query this directory
|
|
|
|
mkdir -p ${INSTALL}/usr/lib/alsa-lib
|
|
|
|
cp -P ${PKG_BUILD}/.*/src/asound/.libs/*.so ${INSTALL}/usr/lib/alsa-lib/
|
2022-11-10 21:39:25 +00:00
|
|
|
sed -i ${INSTALL}/etc/dbus-1/system.d/bluealsa.conf -e "s|audio|root|g"
|
|
|
|
sed -i ${INSTALL}/usr/lib/systemd/system/bluealsa.service \
|
|
|
|
-e "s|ExecStart=.*|ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink -c aptx|g"
|
2022-11-08 21:17:24 +00:00
|
|
|
rm -rf ${INSTALL}/home
|
|
|
|
# rm -rf ${INSTALL}/lib ${INSTALL}/var
|
|
|
|
# rm -rf ${INSTALL}/usr/share/alsa/speaker-test
|
|
|
|
# rm -rf ${INSTALL}/usr/share/sounds
|
|
|
|
# rm -rf ${INSTALL}/usr/lib/systemd/system
|
|
|
|
}
|
2022-11-10 21:39:25 +00:00
|
|
|
|
|
|
|
post_install() {
|
|
|
|
enable_service bluealsa.service
|
|
|
|
}
|