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.

131 lines
3.6 KiB

  1. #
  2. # Copyright (C) 2006-2015 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.30
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/bluetooth/
  13. PKG_MD5SUM:=24ba1d1e8e7ef5b8f4033a3059d7600e
  14. PKG_LICENSE:=GPL-2.0+
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
  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
  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 +dbus +glib2 +libical +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
  48. endef
  49. define Package/bluez-utils/conffiles
  50. /etc/bluetooth/main.conf
  51. /etc/bluetooth/network.conf
  52. /etc/bluetooth/input.conf
  53. /etc/bluetooth/proximity.conf
  54. /etc/config/bluetooth
  55. endef
  56. CONFIGURE_ARGS += \
  57. --enable-static \
  58. --enable-shared \
  59. --enable-client \
  60. --enable-datafiles \
  61. --enable-experimental \
  62. --enable-library \
  63. --enable-monitor \
  64. --enable-obex \
  65. --enable-threads \
  66. --enable-tools \
  67. --disable-android \
  68. --disable-cups \
  69. --disable-manpages \
  70. --disable-sixaxis \
  71. --disable-systemd \
  72. --disable-test \
  73. --disable-udev \
  74. TARGET_CPPFLAGS += \
  75. -D_GNU_SOURCE
  76. define Build/InstallDev
  77. $(INSTALL_DIR) $(1)/usr/include
  78. $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
  81. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
  83. endef
  84. define Package/bluez-examples/install
  85. $(INSTALL_DIR) $(1)/usr/bin/bluez
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/
  87. endef
  88. define Package/bluez-libs/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
  91. endef
  92. define Package/bluez-utils/install
  93. $(INSTALL_DIR) $(1)/usr/bin
  94. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
  97. $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
  98. $(INSTALL_DIR) $(1)/etc/config
  99. $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
  100. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
  101. $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
  102. $(INSTALL_DIR) $(1)/etc/bluetooth
  103. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
  104. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
  105. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
  106. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/proximity/proximity.conf $(1)/etc/bluetooth/proximity.conf
  107. $(INSTALL_DIR) $(1)/etc/init.d
  108. $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
  109. endef
  110. $(eval $(call BuildPackage,bluez-examples))
  111. $(eval $(call BuildPackage,bluez-libs))
  112. $(eval $(call BuildPackage,bluez-utils))