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.

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