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_MD5SUM:=dae2ed00c63791800ea7d10a381270a5
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
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-examples
34 $(call Package/bluez/Default)
37 TITLE+= python example apps
41 define Package/bluez-examples/description
42 contains many examples apps for bluetooth, requiring python
45 define Package/bluez-libs
46 $(call Package/bluez/Default)
50 DEPENDS:=+libpthread +kmod-bluetooth
53 define Package/bluez-utils
54 $(call Package/bluez/Default)
58 DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
61 define Package/bluez-daemon
62 $(call Package/bluez/Default)
66 DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
69 define Package/bluez-daemon/conffiles
70 /etc/bluetooth/main.conf
71 /etc/bluetooth/network.conf
72 /etc/bluetooth/input.conf
73 /etc/bluetooth/proximity.conf
82 --enable-experimental \
99 define Build/InstallDev
100 $(INSTALL_DIR) $(1)/usr/include
101 $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
102 $(INSTALL_DIR) $(1)/usr/lib
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
104 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
108 define Package/bluez-examples/install
109 $(INSTALL_DIR) $(1)/usr/bin/bluez
110 $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/
113 define Package/bluez-libs/install
114 $(INSTALL_DIR) $(1)/usr/lib
115 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
118 define Package/bluez-utils/install
119 $(INSTALL_DIR) $(1)/usr/bin
120 $(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
121 $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
122 $(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
123 $(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
124 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
125 $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
126 $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
127 $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
128 $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
129 $(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
130 $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
131 $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
132 $(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
133 $(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
134 $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
135 $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
138 define Package/bluez-daemon/install
139 $(INSTALL_DIR) $(1)/usr/bin
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
141 $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
142 $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
143 $(INSTALL_DIR) $(1)/etc/config
144 $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
145 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
146 $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
147 $(INSTALL_DIR) $(1)/etc/bluetooth
148 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
149 $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
150 $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
151 $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/proximity/proximity.conf $(1)/etc/bluetooth/proximity.conf
152 $(INSTALL_DIR) $(1)/etc/init.d
153 $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
156 $(eval $(call BuildPackage,bluez-examples))
157 $(eval $(call BuildPackage,bluez-libs))
158 $(eval $(call BuildPackage,bluez-utils))
159 $(eval $(call BuildPackage,bluez-daemon))