bluez: Add bluez-daemon package
authorBruno Randolf <[email protected]>
Fri, 29 May 2015 13:58:29 +0000 (14:58 +0100)
committerZoltan HERPAI <[email protected]>
Sat, 18 Nov 2017 12:03:00 +0000 (13:03 +0100)
Move bluetoothd and related programs and files from bluez-utils into
bluez-daemon package. The main motivation for this is to remove the dependency
to DBus from bluez-utils. The utilities like "hcitool" are useful without it.

Also add kmod-bluetooth dependency to bluez-utils, as the utils don't make much
sense without bluetooth support in the kernel.

Signed-off-by: Bruno Randolf <[email protected]>
utils/bluez/Makefile

index 4865698f2afa33df48ba7e184835a7c4e6c6dd76..ebc1646396346b68b5d40fbbd9441df27d376ec8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez
 PKG_VERSION:=5.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/bluetooth/
@@ -47,7 +47,7 @@ $(call Package/bluez/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= library
-  DEPENDS:=+libpthread
+  DEPENDS:=+libpthread +kmod-bluetooth
 endef
 
 define Package/bluez-utils
@@ -55,10 +55,18 @@ $(call Package/bluez/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE+= utilities
-  DEPENDS:=+bluez-libs +libpthread +librt +dbus +glib2 +libical +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
+  DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
 endef
 
-define Package/bluez-utils/conffiles
+define Package/bluez-daemon
+$(call Package/bluez/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE+= daemon
+  DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
+endef
+
+define Package/bluez-daemon/conffiles
 /etc/bluetooth/main.conf
 /etc/bluetooth/network.conf
 /etc/bluetooth/input.conf
@@ -109,10 +117,28 @@ endef
 
 define Package/bluez-utils/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
+endef
+
+define Package/bluez-daemon/install
+       $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
        $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
@@ -129,3 +155,4 @@ endef
 $(eval $(call BuildPackage,bluez-examples))
 $(eval $(call BuildPackage,bluez-libs))
 $(eval $(call BuildPackage,bluez-utils))
+$(eval $(call BuildPackage,bluez-daemon))