board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / bluez5_utils / bluez5_utils.mk
blob4d31a187b1da0ea7fe66a10eb961aa4a549fbcf0
1 ################################################################################
3 # bluez5_utils
5 ################################################################################
7 BLUEZ5_UTILS_VERSION = 5.44
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 = GPLv2+, LGPLv2.1+
13 BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB
15 BLUEZ5_UTILS_CONF_OPTS = \
16 --enable-tools \
17 --enable-library \
18 --disable-cups
20 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y)
21 BLUEZ5_UTILS_CONF_OPTS += --enable-obex
22 BLUEZ5_UTILS_DEPENDENCIES += libical
23 else
24 BLUEZ5_UTILS_CONF_OPTS += --disable-obex
25 endif
27 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y)
28 BLUEZ5_UTILS_CONF_OPTS += --enable-client
29 BLUEZ5_UTILS_DEPENDENCIES += readline
30 else
31 BLUEZ5_UTILS_CONF_OPTS += --disable-client
32 endif
34 # experimental plugins
35 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y)
36 BLUEZ5_UTILS_CONF_OPTS += --enable-experimental
37 else
38 BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
39 endif
41 # enable sixaxis plugin
42 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS),y)
43 BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
44 else
45 BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
46 endif
48 # install gatttool (For some reason upstream choose not to do it by default)
49 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
50 define BLUEZ5_UTILS_INSTALL_GATTTOOL
51 $(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
52 endef
53 BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
54 endif
56 # enable test
57 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TEST),y)
58 BLUEZ5_UTILS_CONF_OPTS += --enable-test
59 else
60 BLUEZ5_UTILS_CONF_OPTS += --disable-test
61 endif
63 # use udev if available
64 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
65 BLUEZ5_UTILS_CONF_OPTS += --enable-udev
66 BLUEZ5_UTILS_DEPENDENCIES += udev
67 else
68 BLUEZ5_UTILS_CONF_OPTS += --disable-udev
69 endif
71 # integrate with systemd if available
72 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
73 BLUEZ5_UTILS_CONF_OPTS += --enable-systemd
74 BLUEZ5_UTILS_DEPENDENCIES += systemd
75 else
76 BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
77 endif
79 define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
80 mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
81 ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
82 $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
83 ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
84 $(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
85 endef
87 $(eval $(autotools-package))