You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
4.9 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=bluez
  9. PKG_VERSION:=5.56
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
  13. PKG_HASH:=59c4dba9fc8aae2a6a5f8f12f19bc1b0c2dc27355c7ca3123eed3fe6bd7d0b9d
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=
  17. PKG_CPE_ID:=cpe:/a:bluez:bluez
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/bluez/Default
  23. TITLE:=Bluetooth
  24. URL:=http://www.bluez.org/
  25. endef
  26. define Package/bluez-libs
  27. $(call Package/bluez/Default)
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. TITLE+= library
  31. DEPENDS:=+libpthread +USB_SUPPORT:kmod-bluetooth
  32. endef
  33. define Package/bluez-utils
  34. $(call Package/bluez/Default)
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE+= utilities
  38. DEPENDS:=+bluez-libs
  39. endef
  40. define Package/bluez-utils-extra
  41. $(call Package/bluez/Default)
  42. SECTION:=utils
  43. CATEGORY:=Utilities
  44. TITLE+= additional utilities
  45. DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
  46. endef
  47. define Package/bluez-daemon
  48. $(call Package/bluez/Default)
  49. SECTION:=utils
  50. CATEGORY:=Utilities
  51. TITLE+= daemon
  52. DEPENDS:=+bluez-libs +bluez-utils +bluez-utils-extra +glib2 +libncurses +libreadline +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
  53. endef
  54. define Package/bluez-daemon/conffiles
  55. /etc/bluetooth/main.conf
  56. /etc/bluetooth/network.conf
  57. /etc/bluetooth/input.conf
  58. /etc/bluetooth/keys
  59. /etc/config/bluetooth
  60. endef
  61. TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections
  62. TARGET_LDFLAGS += -Wl,--gc-sections
  63. CONFIGURE_ARGS += \
  64. --enable-static \
  65. --enable-shared \
  66. --enable-client \
  67. --enable-datafiles \
  68. --enable-experimental \
  69. --enable-library \
  70. --enable-monitor \
  71. --enable-obex \
  72. --enable-threads \
  73. --enable-tools \
  74. --disable-android \
  75. --disable-cups \
  76. --disable-manpages \
  77. --disable-sixaxis \
  78. --disable-systemd \
  79. --disable-test \
  80. --disable-udev \
  81. --enable-deprecated
  82. define Build/InstallDev
  83. $(INSTALL_DIR) $(1)/usr/include
  84. $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
  85. $(INSTALL_DIR) $(1)/usr/lib
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
  87. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
  89. endef
  90. define Package/bluez-libs/install
  91. $(INSTALL_DIR) $(1)/usr/lib
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
  93. endef
  94. define Package/bluez-utils/install
  95. $(INSTALL_DIR) $(1)/usr/bin
  96. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
  97. # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
  109. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
  111. endef
  112. define Package/bluez-utils-extra/install
  113. $(INSTALL_DIR) $(1)/usr/bin
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
  116. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
  117. $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
  118. endef
  119. define Package/bluez-daemon/install
  120. $(INSTALL_DIR) $(1)/usr/bin
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
  122. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
  124. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
  125. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
  126. $(INSTALL_DIR) $(1)/etc/bluetooth
  127. $(INSTALL_DIR) $(1)/etc/bluetooth/keys
  128. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
  129. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
  130. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
  131. $(INSTALL_DIR) $(1)/etc/init.d
  132. $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
  133. endef
  134. $(eval $(call BuildPackage,bluez-libs))
  135. $(eval $(call BuildPackage,bluez-utils))
  136. $(eval $(call BuildPackage,bluez-utils-extra))
  137. $(eval $(call BuildPackage,bluez-daemon))