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.

102 lines
2.5 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.27
  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:=a8fc508690e497e88c2c0b373cd653a8
  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-libs
  25. $(call Package/bluez/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE+= library
  29. DEPENDS:=+libpthread
  30. endef
  31. define Package/bluez-utils
  32. $(call Package/bluez/Default)
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. TITLE+= utilities
  36. DEPENDS:=+bluez-libs +libpthread +dbus +glib2 +libical +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
  37. endef
  38. define Package/bluez-utils/conffiles
  39. /etc/bluetooth/hcid.conf
  40. /etc/bluetooth/rfcomm.conf
  41. /etc/config/bluetooth
  42. endef
  43. CONFIGURE_ARGS += \
  44. --enable-static \
  45. --enable-shared \
  46. --enable-client \
  47. --enable-datafiles \
  48. --enable-experimental \
  49. --enable-library \
  50. --enable-monitor \
  51. --enable-obex \
  52. --enable-threads \
  53. --enable-tools \
  54. --disable-android \
  55. --disable-cups \
  56. --disable-manpages \
  57. --disable-sixaxis \
  58. --disable-systemd \
  59. --disable-test \
  60. --disable-udev \
  61. TARGET_CPPFLAGS += \
  62. -D_GNU_SOURCE
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
  70. endef
  71. define Package/bluez-libs/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
  74. endef
  75. define Package/bluez-utils/install
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  78. $(INSTALL_DIR) $(1)/etc/config
  79. $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
  80. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
  81. $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
  82. $(INSTALL_DIR) $(1)/etc/init.d
  83. $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
  84. endef
  85. $(eval $(call BuildPackage,bluez-libs))
  86. $(eval $(call BuildPackage,bluez-utils))