2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/linux
/bluetooth
/
16 PKG_HASH
:=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
19 PKG_LICENSE_FILES
:=COPYING
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/nls.mk
28 define Package
/bluez
/Default
30 URL
:=http
://www.bluez.org
/
33 define Package
/bluez-libs
34 $(call Package
/bluez
/Default
)
38 DEPENDS
:=+libpthread
+USB_SUPPORT
:kmod-bluetooth
41 define Package
/bluez-utils
42 $(call Package
/bluez
/Default
)
46 DEPENDS
:=+bluez-libs
+libpthread
+librt
+glib2
+libncurses
+libreadline
$(INTL_DEPENDS
) $(ICONV_DEPENDS
) +dbus
49 define Package
/bluez-daemon
50 $(call Package
/bluez
/Default
)
54 DEPENDS
:=+bluez-libs
+bluez-utils
+dbus
+libical
$(INTL_DEPENDS
) $(ICONV_DEPENDS
)
57 define Package
/bluez-daemon
/conffiles
58 /etc
/bluetooth
/main.conf
59 /etc
/bluetooth
/network.conf
60 /etc
/bluetooth
/input.conf
65 TARGET_CFLAGS
+= -D_GNU_SOURCE
-ffunction-sections
-fdata-sections
66 TARGET_LDFLAGS
+= -Wl
,--gc-sections
73 --enable-experimental \
88 define Build
/InstallDev
89 $(INSTALL_DIR
) $(1)/usr
/include
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/bluetooth
$(1)/usr
/include/
91 $(INSTALL_DIR
) $(1)/usr
/lib
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbluetooth.
{a
,so
*} $(1)/usr
/lib
/
93 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/bluez.
pc $(1)/usr
/lib
/pkgconfig
/
97 define Package
/bluez-libs
/install
98 $(INSTALL_DIR
) $(1)/usr
/lib
99 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbluetooth.so.
* $(1)/usr
/lib
/
102 define Package
/bluez-utils
/install
103 $(INSTALL_DIR
) $(1)/usr
/bin
104 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/bdaddr
$(1)/usr
/bin
/
105 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/bccmd
$(1)/usr
/bin
/
106 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/bluemoon
$(1)/usr
/bin
/
107 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/btattach
$(1)/usr
/bin
/
108 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/btmon
$(1)/usr
/bin
/
109 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/btmgmt
$(1)/usr
/bin
/
110 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ciptool
$(1)/usr
/bin
/
111 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/hciattach
$(1)/usr
/bin
/
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/hciconfig
$(1)/usr
/bin
/
113 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/hcidump
$(1)/usr
/bin
/
114 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/hcitool
$(1)/usr
/bin
/
115 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/hex2hcd
$(1)/usr
/bin
/
116 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/l2ping
$(1)/usr
/bin
/
117 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/l2test
$(1)/usr
/bin
/
118 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/mpris-proxy
$(1)/usr
/bin
/
119 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rctest
$(1)/usr
/bin
/
120 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rfcomm
$(1)/usr
/bin
/
121 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sdptool
$(1)/usr
/bin
/
122 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/attrib
/gatttool
$(1)/usr
/bin
/
125 define Package
/bluez-daemon
/install
126 $(INSTALL_DIR
) $(1)/usr
/bin
127 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/bluetooth
/bluetoothd
$(1)/usr
/bin
/
128 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/bluetoothctl
$(1)/usr
/bin
/
129 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/bluetooth
/obexd
$(1)/usr
/bin
/
130 $(INSTALL_DIR
) $(1)/etc
/dbus-1
/system.d
/
131 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/bluetooth.conf
$(1)/etc
/dbus-1
/system.d
/bluetooth.conf
132 $(INSTALL_DIR
) $(1)/etc
/bluetooth
133 $(INSTALL_DIR
) $(1)/etc
/bluetooth
/keys
134 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/src
/main.conf
$(1)/etc
/bluetooth
/main.conf
135 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/profiles
/network
/network.conf
$(1)/etc
/bluetooth
/network.conf
136 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/profiles
/input
/input.conf
$(1)/etc
/bluetooth
/input.conf
137 $(INSTALL_DIR
) $(1)/etc
/init.d
138 $(INSTALL_BIN
) .
/files
/bluetoothd.init
$(1)/etc
/init.d
/bluetoothd
141 $(eval
$(call BuildPackage
,bluez-libs
))
142 $(eval
$(call BuildPackage
,bluez-utils
))
143 $(eval
$(call BuildPackage
,bluez-daemon
))