2014-03-31 10:58:00 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# bluez5_utils
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-09-13 13:56:55 +02:00
|
|
|
# Keep the version and patches in sync with bluez5_utils-headers
|
2021-04-04 19:48:58 +02:00
|
|
|
BLUEZ5_UTILS_VERSION = 5.58
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
|
|
|
|
BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
|
|
|
|
BLUEZ5_UTILS_INSTALL_STAGING = YES
|
2017-03-30 15:43:34 +02:00
|
|
|
BLUEZ5_UTILS_LICENSE = GPL-2.0+, LGPL-2.1+
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB
|
2021-02-08 21:08:25 +01:00
|
|
|
BLUEZ5_UTILS_CPE_ID_VENDOR = bluez
|
|
|
|
BLUEZ5_UTILS_CPE_ID_PRODUCT = bluez
|
2014-03-31 10:58:00 +02:00
|
|
|
|
2018-10-21 18:00:34 +02:00
|
|
|
BLUEZ5_UTILS_DEPENDENCIES = \
|
|
|
|
$(if $(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),bluez5_utils-headers) \
|
|
|
|
dbus \
|
|
|
|
libglib2
|
|
|
|
|
2017-04-21 17:24:48 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS = \
|
|
|
|
--enable-tools \
|
|
|
|
--enable-library \
|
2018-12-12 21:52:06 +01:00
|
|
|
--disable-cups \
|
|
|
|
--with-dbusconfdir=/etc
|
2014-03-31 10:58:00 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-obex
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += libical
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-obex
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-client
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += readline
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-client
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# experimental plugins
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-experimental
|
2014-03-31 10:58:00 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
2017-05-01 14:59:43 +02:00
|
|
|
# enable health plugin
|
2018-05-13 21:07:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH),y)
|
2017-05-01 14:59:43 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-health
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-health
|
|
|
|
endif
|
|
|
|
|
2020-03-16 17:52:51 +01:00
|
|
|
# enable mesh profile
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MESH),y)
|
2020-03-16 17:52:53 +01:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-external-ell --enable-mesh
|
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += ell json-c readline
|
2020-03-16 17:52:51 +01:00
|
|
|
else
|
2020-03-16 17:52:53 +01:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-external-ell --disable-mesh
|
2020-03-16 17:52:51 +01:00
|
|
|
endif
|
|
|
|
|
2017-05-01 14:59:44 +02:00
|
|
|
# enable midi profile
|
2018-05-13 21:07:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI),y)
|
2017-05-01 14:59:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-midi
|
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += alsa-lib
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-midi
|
|
|
|
endif
|
|
|
|
|
2017-05-01 14:59:43 +02:00
|
|
|
# enable nfc plugin
|
2018-05-13 21:07:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC),y)
|
2017-05-01 14:59:43 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-nfc
|
|
|
|
endif
|
|
|
|
|
|
|
|
# enable sap plugin
|
2018-05-13 21:07:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP),y)
|
2017-05-01 14:59:43 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-sap
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-sap
|
|
|
|
endif
|
|
|
|
|
2015-07-16 10:46:14 +02:00
|
|
|
# enable sixaxis plugin
|
2018-05-13 21:07:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SIXAXIS),y)
|
2015-07-16 10:46:14 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
|
|
|
|
endif
|
|
|
|
|
2014-03-31 10:58:00 +02:00
|
|
|
# install gatttool (For some reason upstream choose not to do it by default)
|
2017-05-01 14:59:41 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
|
2014-03-31 10:58:00 +02:00
|
|
|
define BLUEZ5_UTILS_INSTALL_GATTTOOL
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
|
|
|
|
endef
|
|
|
|
BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
|
2017-08-31 11:49:31 +02:00
|
|
|
# hciattach_bcm43xx defines default firmware path in `/etc/firmware`, but
|
|
|
|
# Broadcom firmware blobs are usually located in `/lib/firmware`.
|
|
|
|
BLUEZ5_UTILS_CONF_ENV += \
|
|
|
|
CPPFLAGS='$(TARGET_CPPFLAGS) -DFIRMWARE_DIR=\"/lib/firmware\"'
|
2017-05-01 14:59:41 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# enable test
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TEST),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-test
|
2014-03-31 10:58:00 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-test
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
2020-09-11 08:43:52 +02:00
|
|
|
# enable hid2hci tool
|
|
|
|
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TOOLS_HID2HCI),y)
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-hid2hci
|
|
|
|
else
|
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-hid2hci
|
|
|
|
endif
|
|
|
|
|
2014-03-31 10:58:00 +02:00
|
|
|
# use udev if available
|
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-udev
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += udev
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-udev
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# integrate with systemd if available
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --enable-systemd
|
2014-03-31 10:58:00 +02:00
|
|
|
BLUEZ5_UTILS_DEPENDENCIES += systemd
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
|
2014-03-31 10:58:00 +02:00
|
|
|
endif
|
|
|
|
|
2020-12-21 19:29:20 +01:00
|
|
|
define BLUEZ5_UTILS_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/bluez5_utils/S40bluetooth \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S40bluetooth
|
|
|
|
endef
|
|
|
|
|
2014-03-31 10:58:00 +02:00
|
|
|
$(eval $(autotools-package))
|