Merge pull request #862 from chris5560/master
[feed/packages.git] / utils / bluez / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bluez
11 PKG_VERSION:=5.28
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/bluetooth/
16 PKG_MD5SUM:=bc20a8285530758c68f6a60e4ca62a15
17
18 PKG_LICENSE:=GPL-2.0+
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/nls.mk
26
27 define Package/bluez/Default
28 TITLE:=Bluetooth
29 URL:=http://www.bluez.org/
30 endef
31
32 define Package/bluez-libs
33 $(call Package/bluez/Default)
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE+= library
37 DEPENDS:=+libpthread
38 endef
39
40 define Package/bluez-utils
41 $(call Package/bluez/Default)
42 SECTION:=utils
43 CATEGORY:=Utilities
44 TITLE+= utilities
45 DEPENDS:=+bluez-libs +libpthread +dbus +glib2 +libical +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
46 endef
47
48 define Package/bluez-utils/conffiles
49 /etc/bluetooth/hcid.conf
50 /etc/bluetooth/rfcomm.conf
51 /etc/config/bluetooth
52 endef
53
54 CONFIGURE_ARGS += \
55 --enable-static \
56 --enable-shared \
57 --enable-client \
58 --enable-datafiles \
59 --enable-experimental \
60 --enable-library \
61 --enable-monitor \
62 --enable-obex \
63 --enable-threads \
64 --enable-tools \
65 --disable-android \
66 --disable-cups \
67 --disable-manpages \
68 --disable-sixaxis \
69 --disable-systemd \
70 --disable-test \
71 --disable-udev \
72
73 TARGET_CPPFLAGS += \
74 -D_GNU_SOURCE
75
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
85 define Package/bluez-libs/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
88 endef
89
90 define Package/bluez-utils/install
91 $(INSTALL_DIR) $(1)/usr/bin
92 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
93 $(INSTALL_DIR) $(1)/etc/config
94 $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
95 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
96 $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
99 endef
100
101 $(eval $(call BuildPackage,bluez-libs))
102 $(eval $(call BuildPackage,bluez-utils))