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.

143 lines
4.6 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:=4
  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+
  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 +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
  38. endef
  39. define Package/bluez-daemon
  40. $(call Package/bluez/Default)
  41. SECTION:=utils
  42. CATEGORY:=Utilities
  43. TITLE+= daemon
  44. DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
  45. endef
  46. define Package/bluez-daemon/conffiles
  47. /etc/bluetooth/main.conf
  48. /etc/bluetooth/network.conf
  49. /etc/bluetooth/input.conf
  50. /etc/bluetooth/keys
  51. /etc/config/bluetooth
  52. endef
  53. TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections
  54. TARGET_LDFLAGS += -Wl,--gc-sections
  55. CONFIGURE_ARGS += \
  56. --enable-static \
  57. --enable-shared \
  58. --enable-client \
  59. --enable-datafiles \
  60. --enable-experimental \
  61. --enable-library \
  62. --enable-monitor \
  63. --enable-obex \
  64. --enable-threads \
  65. --enable-tools \
  66. --disable-android \
  67. --disable-cups \
  68. --disable-manpages \
  69. --disable-sixaxis \
  70. --disable-systemd \
  71. --disable-test \
  72. --disable-udev \
  73. --enable-deprecated
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
  81. endef
  82. define Package/bluez-libs/install
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
  85. endef
  86. define Package/bluez-utils/install
  87. $(INSTALL_DIR) $(1)/usr/bin
  88. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
  89. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
  93. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
  95. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
  97. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
  106. $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
  107. endef
  108. define Package/bluez-daemon/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
  111. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
  112. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
  113. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
  114. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
  115. $(INSTALL_DIR) $(1)/etc/bluetooth
  116. $(INSTALL_DIR) $(1)/etc/bluetooth/keys
  117. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
  118. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
  119. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
  120. $(INSTALL_DIR) $(1)/etc/init.d
  121. $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
  122. endef
  123. $(eval $(call BuildPackage,bluez-libs))
  124. $(eval $(call BuildPackage,bluez-utils))
  125. $(eval $(call BuildPackage,bluez-daemon))