squid: update to 6.11
[feed/packages.git] / utils / bluez / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bluez
11 PKG_VERSION:=5.72
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
16 PKG_HASH:=499d7fa345a996c1bb650f5c6749e1d929111fa6ece0be0e98687fee6124536e
17
18 PKG_LICENSE:=GPL-2.0-or-later
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=
21 PKG_CPE_ID:=cpe:/a:bluez:bluez
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_INSTALL:=1
25 PKG_BUILD_FLAGS:=gc-sections
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/bluez/Default
31 TITLE:=Bluetooth
32 URL:=https://www.bluez.org/
33 endef
34
35 define Package/bluez-libs
36 $(call Package/bluez/Default)
37 SECTION:=libs
38 CATEGORY:=Libraries
39 TITLE+= library
40 DEPENDS:=+libpthread +USB_SUPPORT:kmod-bluetooth
41 endef
42
43 define Package/bluez-utils
44 $(call Package/bluez/Default)
45 SECTION:=utils
46 CATEGORY:=Utilities
47 TITLE+= utilities
48 DEPENDS:=+bluez-libs
49 endef
50
51 define Package/bluez-utils-btmon
52 $(call Package/bluez/Default)
53 SECTION:=utils
54 CATEGORY:=Utilities
55 TITLE+= utilities
56 DEPENDS:=+bluez-libs +glib2
57 endef
58
59 define Package/bluez-utils-extra
60 $(call Package/bluez/Default)
61 SECTION:=utils
62 CATEGORY:=Utilities
63 TITLE+= additional utilities
64 DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
65 endef
66
67 define Package/bluez-daemon
68 $(call Package/bluez/Default)
69 SECTION:=utils
70 CATEGORY:=Utilities
71 TITLE+= daemon
72 DEPENDS:=+bluez-libs +bluez-utils +bluez-utils-extra +glib2 +libncurses +libreadline +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
73 endef
74
75 define Package/bluez-daemon/conffiles
76 /etc/bluetooth/main.conf
77 /etc/bluetooth/network.conf
78 /etc/bluetooth/input.conf
79 /etc/bluetooth/keys
80 /etc/config/bluetooth
81 endef
82
83 CONFIGURE_ARGS += \
84 --enable-static \
85 --enable-client \
86 --enable-datafiles \
87 --enable-experimental \
88 --enable-library \
89 --enable-monitor \
90 --enable-obex \
91 --enable-threads \
92 --enable-tools \
93 --disable-android \
94 --disable-cups \
95 --disable-manpages \
96 --disable-sixaxis \
97 --disable-systemd \
98 --disable-test \
99 --disable-udev \
100 --enable-deprecated
101
102 define Build/InstallDev
103 $(INSTALL_DIR) $(1)/usr/include
104 $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
107 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
109 endef
110
111 define Package/bluez-libs/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
114 endef
115
116 define Package/bluez-utils/install
117 $(INSTALL_DIR) $(1)/usr/bin
118 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
120 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
121 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
130 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
131 endef
132
133 define Package/bluez-utils-btmon/install
134 $(INSTALL_DIR) $(1)/usr/bin
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
136 endef
137
138 define Package/bluez-utils-extra/install
139 $(INSTALL_DIR) $(1)/usr/bin
140 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
143 $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
144 endef
145
146 define Package/bluez-daemon/install
147 $(INSTALL_DIR) $(1)/usr/bin
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
151 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
152 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
153 $(INSTALL_DIR) $(1)/etc/bluetooth
154 $(INSTALL_DIR) $(1)/etc/bluetooth/keys
155 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
156 $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
157 $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
158 $(INSTALL_DIR) $(1)/etc/init.d
159 $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
160 endef
161
162 $(eval $(call BuildPackage,bluez-libs))
163 $(eval $(call BuildPackage,bluez-utils))
164 $(eval $(call BuildPackage,bluez-utils-btmon))
165 $(eval $(call BuildPackage,bluez-utils-extra))
166 $(eval $(call BuildPackage,bluez-daemon))