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.

130 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_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/bluez/Default
  21. TITLE:=Bluetooth
  22. URL:=http://www.bluez.org/
  23. endef
  24. define Package/bluez-examples
  25. $(call Package/bluez/Default)
  26. SECTION:=utils
  27. CATEGORY:=Utilities
  28. TITLE+= python example apps
  29. DEPENDS:=+python
  30. endef
  31. define Package/bluez-examples/description
  32. contains many examples apps for bluetooth, requiring python
  33. endef
  34. define Package/bluez-libs
  35. $(call Package/bluez/Default)
  36. SECTION:=libs
  37. CATEGORY:=Libraries
  38. TITLE+= library
  39. DEPENDS:=+libpthread
  40. endef
  41. define Package/bluez-utils
  42. $(call Package/bluez/Default)
  43. SECTION:=utils
  44. CATEGORY:=Utilities
  45. TITLE+= utilities
  46. DEPENDS:=+bluez-libs +libpthread +librt +dbus +glib2 +libical +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
  47. endef
  48. define Package/bluez-utils/conffiles
  49. /etc/bluetooth/main.conf
  50. /etc/bluetooth/network.conf
  51. /etc/bluetooth/input.conf
  52. /etc/bluetooth/proximity.conf
  53. /etc/config/bluetooth
  54. endef
  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. TARGET_CPPFLAGS += \
  74. -D_GNU_SOURCE
  75. define Build/InstallDev
  76. $(INSTALL_DIR) $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
  80. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
  82. endef
  83. define Package/bluez-examples/install
  84. $(INSTALL_DIR) $(1)/usr/bin/bluez
  85. $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/
  86. endef
  87. define Package/bluez-libs/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
  90. endef
  91. define Package/bluez-utils/install
  92. $(INSTALL_DIR) $(1)/usr/bin
  93. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
  96. $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
  97. $(INSTALL_DIR) $(1)/etc/config
  98. $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
  99. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
  100. $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
  101. $(INSTALL_DIR) $(1)/etc/bluetooth
  102. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
  103. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
  104. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
  105. $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/proximity/proximity.conf $(1)/etc/bluetooth/proximity.conf
  106. $(INSTALL_DIR) $(1)/etc/init.d
  107. $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
  108. endef
  109. $(eval $(call BuildPackage,bluez-examples))
  110. $(eval $(call BuildPackage,bluez-libs))
  111. $(eval $(call BuildPackage,bluez-utils))