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.

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