1 ################################################################################
5 ################################################################################
7 BLUEZ5_UTILS_VERSION = 5.48
8 BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
9 BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
10 BLUEZ5_UTILS_INSTALL_STAGING = YES
11 BLUEZ5_UTILS_DEPENDENCIES = dbus libglib2
12 BLUEZ5_UTILS_LICENSE = GPL-2.0+, LGPL-2.1+
13 BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB
15 BLUEZ5_UTILS_CONF_OPTS = \
20 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y)
21 BLUEZ5_UTILS_CONF_OPTS += --enable-obex
22 BLUEZ5_UTILS_DEPENDENCIES += libical
24 BLUEZ5_UTILS_CONF_OPTS += --disable-obex
27 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y)
28 BLUEZ5_UTILS_CONF_OPTS += --enable-client
29 BLUEZ5_UTILS_DEPENDENCIES += readline
31 BLUEZ5_UTILS_CONF_OPTS += --disable-client
34 # experimental plugins
35 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y)
36 BLUEZ5_UTILS_CONF_OPTS += --enable-experimental
38 BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
41 # enable health plugin
42 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH),y)
43 BLUEZ5_UTILS_CONF_OPTS += --enable-health
45 BLUEZ5_UTILS_CONF_OPTS += --disable-health
49 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI),y)
50 BLUEZ5_UTILS_CONF_OPTS += --enable-midi
51 BLUEZ5_UTILS_DEPENDENCIES += alsa-lib
53 BLUEZ5_UTILS_CONF_OPTS += --disable-midi
57 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_NFC),y)
58 BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
60 BLUEZ5_UTILS_CONF_OPTS += --disable-nfc
64 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SAP),y)
65 BLUEZ5_UTILS_CONF_OPTS += --enable-sap
67 BLUEZ5_UTILS_CONF_OPTS += --disable-sap
70 # enable sixaxis plugin
71 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS),y)
72 BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
74 BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
77 # install gatttool (For some reason upstream choose not to do it by default)
78 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
79 define BLUEZ5_UTILS_INSTALL_GATTTOOL
80 $(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
82 BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
83 # hciattach_bcm43xx defines default firmware path in `/etc/firmware`, but
84 # Broadcom firmware blobs are usually located in `/lib/firmware`.
85 BLUEZ5_UTILS_CONF_ENV += \
86 CPPFLAGS='$(TARGET_CPPFLAGS) -DFIRMWARE_DIR=\"/lib/firmware\"'
87 BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
89 BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
93 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TEST),y)
94 BLUEZ5_UTILS_CONF_OPTS += --enable-test
96 BLUEZ5_UTILS_CONF_OPTS += --disable-test
99 # use udev if available
100 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
101 BLUEZ5_UTILS_CONF_OPTS += --enable-udev
102 BLUEZ5_UTILS_DEPENDENCIES += udev
104 BLUEZ5_UTILS_CONF_OPTS += --disable-udev
107 # integrate with systemd if available
108 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
109 BLUEZ5_UTILS_CONF_OPTS += --enable-systemd
110 BLUEZ5_UTILS_DEPENDENCIES += systemd
112 BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
115 define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
116 mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
117 ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
118 $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
119 ln -fs ../../../usr/lib/systemd/system/bluetooth.service \
120 $(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
123 $(eval $(autotools-package))