2018-07-16 20:45:36 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
2019-09-19 22:13:47 +01:00
|
|
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
2013-07-28 05:47:47 +02:00
|
|
|
|
|
|
|
|
PKG_NAME="bluez"
|
2024-01-14 07:01:26 +00:00
|
|
|
PKG_VERSION="5.72"
|
|
|
|
|
PKG_SHA256="499d7fa345a996c1bb650f5c6749e1d929111fa6ece0be0e98687fee6124536e"
|
2013-07-28 05:47:47 +02:00
|
|
|
PKG_LICENSE="GPL"
|
|
|
|
|
PKG_SITE="http://www.bluez.org/"
|
2019-09-19 22:13:47 +01:00
|
|
|
PKG_URL="https://www.kernel.org/pub/linux/bluetooth/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
2014-01-30 14:32:48 +01:00
|
|
|
PKG_DEPENDS_TARGET="toolchain dbus glib readline systemd"
|
2013-07-28 05:47:47 +02:00
|
|
|
PKG_LONGDESC="Bluetooth Tools and System Daemons for Linux."
|
2017-10-24 23:23:02 +02:00
|
|
|
PKG_TOOLCHAIN="autotools"
|
2018-05-30 15:54:29 +02:00
|
|
|
PKG_BUILD_FLAGS="+lto"
|
2013-07-28 05:47:47 +02:00
|
|
|
|
2018-02-19 07:08:48 +00:00
|
|
|
if build_with_debug; then
|
2013-07-28 05:47:47 +02:00
|
|
|
BLUEZ_CONFIG="--enable-debug"
|
|
|
|
|
else
|
|
|
|
|
BLUEZ_CONFIG="--disable-debug"
|
|
|
|
|
fi
|
|
|
|
|
|
2021-01-19 19:34:12 +00:00
|
|
|
BLUEZ_CONFIG+=" --enable-monitor --enable-test"
|
2013-07-28 05:47:47 +02:00
|
|
|
|
|
|
|
|
PKG_CONFIGURE_OPTS_TARGET="--disable-dependency-tracking \
|
|
|
|
|
--disable-silent-rules \
|
2021-03-04 17:02:41 -08:00
|
|
|
--enable-library \
|
2013-07-28 21:44:30 +02:00
|
|
|
--enable-udev \
|
2013-07-28 05:47:47 +02:00
|
|
|
--disable-cups \
|
|
|
|
|
--disable-obex \
|
|
|
|
|
--enable-client \
|
2013-08-04 14:16:22 +02:00
|
|
|
--enable-systemd \
|
2021-03-04 17:02:41 -08:00
|
|
|
--enable-tools \
|
|
|
|
|
--enable-deprecated \
|
2013-07-28 05:47:47 +02:00
|
|
|
--enable-datafiles \
|
2021-11-11 22:37:45 +01:00
|
|
|
--disable-manpages \
|
2013-07-28 05:47:47 +02:00
|
|
|
--disable-experimental \
|
2013-12-23 22:15:38 +01:00
|
|
|
--enable-sixaxis \
|
2013-07-28 05:47:47 +02:00
|
|
|
--with-gnu-ld \
|
2021-01-19 19:34:12 +00:00
|
|
|
${BLUEZ_CONFIG} \
|
2013-07-28 05:47:47 +02:00
|
|
|
storagedir=/storage/.cache/bluetooth"
|
|
|
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
|
# bluez fails to build in subdirs
|
2021-01-19 19:34:12 +00:00
|
|
|
cd ${PKG_BUILD}
|
|
|
|
|
rm -rf .${TARGET_NAME}
|
2016-04-15 14:24:49 +03:00
|
|
|
|
2017-08-18 19:25:48 +02:00
|
|
|
export LIBS="-lncurses"
|
2013-07-28 05:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
2022-01-08 10:41:28 +00:00
|
|
|
post_configure_target() {
|
|
|
|
|
libtool_remove_rpath libtool
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-30 09:06:42 +02:00
|
|
|
post_makeinstall_target() {
|
2021-11-11 22:37:45 +01:00
|
|
|
safe_remove ${INSTALL}/usr/lib/systemd
|
|
|
|
|
safe_remove ${INSTALL}/usr/bin/bluemoon
|
|
|
|
|
safe_remove ${INSTALL}/usr/bin/ciptool
|
2017-01-31 15:09:10 +01:00
|
|
|
|
2021-01-19 19:34:12 +00:00
|
|
|
mkdir -p ${INSTALL}/etc/bluetooth
|
|
|
|
|
cp src/main.conf ${INSTALL}/etc/bluetooth
|
|
|
|
|
sed -i ${INSTALL}/etc/bluetooth/main.conf \
|
2017-01-31 15:09:10 +01:00
|
|
|
-e "s|^#\[Policy\]|\[Policy\]|g" \
|
2021-03-01 17:37:33 +01:00
|
|
|
-e "s|^#AutoEnable.*|AutoEnable=true|g" \
|
|
|
|
|
-e "s|^#JustWorksRepairing.*|JustWorksRepairing=always|g"
|
2024-01-14 10:25:34 +00:00
|
|
|
echo "[General]" > ${INSTALL}/etc/bluetooth/input.conf
|
|
|
|
|
echo "ClassicBondedOnly=false" >> ${INSTALL}/etc/bluetooth/input.conf
|
2018-09-26 12:10:12 +04:00
|
|
|
|
2021-01-19 19:34:12 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/share/services
|
|
|
|
|
cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services
|
2018-12-01 11:58:58 +01:00
|
|
|
|
|
|
|
|
# bluez looks in /etc/firmware/
|
2021-01-19 19:34:12 +00:00
|
|
|
ln -sf /usr/lib/firmware ${INSTALL}/etc/firmware
|
2021-12-08 20:35:55 +01:00
|
|
|
|
|
|
|
|
# pulseaudio checks for bluez via pkgconfig but lib is not actually needed
|
|
|
|
|
sed -i 's/-lbluetooth//g' ${PKG_BUILD}/lib/bluez.pc
|
|
|
|
|
cp -P ${PKG_BUILD}/lib/bluez.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig
|
2013-08-12 15:13:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
post_install() {
|
2018-09-26 12:10:12 +04:00
|
|
|
enable_service bluetooth-defaults.service
|
2013-08-04 14:16:22 +02:00
|
|
|
enable_service bluetooth.service
|
2013-08-12 17:00:34 +02:00
|
|
|
enable_service obex.service
|
2013-07-30 09:06:42 +02:00
|
|
|
}
|