]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - verify/update bluetooth init script | |
3 | # - separate obex? | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_without deprecated # deprecated tools (ciptool,hciattach,hciconfig,hcidump,hcitool,rfcomm,sdptool) | |
7 | %bcond_without static_libs # static library | |
8 | %bcond_without systemd # systemd | |
9 | # | |
10 | Summary: Bluetooth utilities | |
11 | Summary(pl.UTF-8): Narzędzia Bluetooth | |
12 | Name: bluez | |
13 | Version: 5.73 | |
14 | Release: 1 | |
15 | License: GPL v2+ | |
16 | Group: Applications/System | |
17 | Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz | |
18 | # Source0-md5: 7812034c8b91bf11e4f1379734756a3b | |
19 | Source1: %{name}.init | |
20 | Source2: %{name}.sysconfig | |
21 | # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs | |
22 | # as found on some Atom based x86 hardware | |
23 | Source3: 69-btattach-bcm.rules | |
24 | Source4: btattach-bcm@.service | |
25 | Source5: btattach-bcm-service.sh | |
26 | Patch0: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch | |
27 | URL: http://www.bluez.org/ | |
28 | BuildRequires: alsa-lib-devel >= 1.0 | |
29 | BuildRequires: autoconf >= 2.60 | |
30 | BuildRequires: automake | |
31 | BuildRequires: check-devel >= 0.9.6 | |
32 | BuildRequires: cups-devel | |
33 | BuildRequires: dbus-devel >= 1.10 | |
34 | BuildRequires: docutils | |
35 | BuildRequires: ell-devel >= 0.39 | |
36 | BuildRequires: glib2-devel >= 1:2.28 | |
37 | BuildRequires: json-c-devel >= 0.13 | |
38 | BuildRequires: libical-devel | |
39 | BuildRequires: libtool | |
40 | BuildRequires: pkgconfig >= 1:0.9.0 | |
41 | BuildRequires: readline-devel | |
42 | BuildRequires: rpm-build >= 4.6 | |
43 | BuildRequires: rpmbuild(macros) >= 2.011 | |
44 | %{?with_systemd:BuildRequires: systemd-devel} | |
45 | BuildRequires: tar >= 1:1.22 | |
46 | BuildRequires: udev-devel >= 1:196 | |
47 | BuildRequires: xz | |
48 | Requires(post,preun,postun): systemd-units >= 1:250.1 | |
49 | Requires: %{name}-libs = %{version}-%{release} | |
50 | Requires: dbus-libs >= 1.10 | |
51 | Requires: ell >= 0.39 | |
52 | Requires: glib2 >= 1:2.28 | |
53 | Requires: hwdata >= 0.225 | |
54 | Requires: json-c >= 0.13 | |
55 | Requires: rc-scripts | |
56 | Requires: systemd-units >= 1:250.1 | |
57 | Requires: udev >= 1:196 | |
58 | Provides: bluez-hcidump = %{version} | |
59 | Provides: bluez-utils = %{version}-%{release} | |
60 | Provides: obexd = %{version} | |
61 | Provides: dbus(org.openobex.client) | |
62 | Provides: obex-data-server = %{version} | |
63 | # moved somewhere or dropped? | |
64 | #Obsoletes: alsa-plugins-bluetooth | |
65 | Obsoletes: bluez-hcidump < 3 | |
66 | Obsoletes: bluez-hciemu < 2 | |
67 | Obsoletes: bluez-pan < 2 | |
68 | Obsoletes: bluez-sdp < 2 | |
69 | Obsoletes: bluez-systemd < 4.98-3 | |
70 | Obsoletes: bluez-utils < 4 | |
71 | Obsoletes: bluez-utils-init < 4 | |
72 | Obsoletes: obexd < 1 | |
73 | Obsoletes: obex-data-server < 1 | |
74 | # moved somewhere or dropped? | |
75 | #Obsoletes: gstreamer-bluetooth < 4.101-3 | |
76 | #Obsoletes: gstreamer0.10-bluetooth < 5 | |
77 | Conflicts: bluez-bluefw | |
78 | ExcludeArch: s390 s390x | |
79 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
80 | ||
81 | # currently lib, not %{_lib} (see cups.spec) | |
82 | %define cupsdir /usr/lib/cups/backend | |
83 | %define udevdir /lib/udev | |
84 | ||
85 | %description | |
86 | Bluetooth utilities: | |
87 | - bluetoothd | |
88 | - hciattach | |
89 | - hciconfig | |
90 | - hcidump | |
91 | - hcitool | |
92 | - l2ping | |
93 | - start scripts (PLD) | |
94 | ||
95 | The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. | |
96 | ||
97 | %description -l pl.UTF-8 | |
98 | Narzędzia Bluetooth: | |
99 | - bluetoothd | |
100 | - hciattach | |
101 | - hciconfig | |
102 | - hcidump | |
103 | - hcitool | |
104 | - l2ping | |
105 | - skrypty startowe (PLD) | |
106 | ||
107 | Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA. | |
108 | ||
109 | %package -n cups-backend-bluetooth | |
110 | Summary: Bluetooth backend for CUPS | |
111 | Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a | |
112 | Group: Applications/Printing | |
113 | Requires: %{name}-libs = %{version}-%{release} | |
114 | Requires: cups | |
115 | ||
116 | %description -n cups-backend-bluetooth | |
117 | Bluetooth backend for CUPS. | |
118 | ||
119 | %description -n cups-backend-bluetooth -l pl.UTF-8 | |
120 | Backend Bluetooth dla CUPS-a. | |
121 | ||
122 | %package -n zsh-completion-bluez | |
123 | Summary: Zsh completion for bluez commands | |
124 | Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez | |
125 | Group: Applications/Shells | |
126 | Requires: %{name} = %{version}-%{release} | |
127 | Requires: zsh | |
128 | BuildArch: noarch | |
129 | ||
130 | %description -n zsh-completion-bluez | |
131 | Zsh completion for bluez commands (bluezctl utility). | |
132 | ||
133 | %description -n zsh-completion-bluez -l pl.UTF-8 | |
134 | Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia | |
135 | bluezctl). | |
136 | ||
137 | %package libs | |
138 | Summary: Bluetooth libraries | |
139 | Summary(pl.UTF-8): Biblioteki Bluetooth | |
140 | Group: Libraries | |
141 | Obsoletes: bluez-sdp < 2 | |
142 | ||
143 | %description libs | |
144 | Libraries for use in Bluetooth applications. | |
145 | ||
146 | The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. | |
147 | ||
148 | %description libs -l pl.UTF-8 | |
149 | Biblioteki do używania w aplikacjach Bluetooth. | |
150 | ||
151 | Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA. | |
152 | ||
153 | %package libs-devel | |
154 | Summary: Header files for Bluetooth applications | |
155 | Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth | |
156 | Group: Development/Libraries | |
157 | Requires: %{name}-libs = %{version}-%{release} | |
158 | Obsoletes: bluez-sdp-devel < 2 | |
159 | ||
160 | %description libs-devel | |
161 | bluez-libs-devel contains header files for use in Bluetooth | |
162 | applications. | |
163 | ||
164 | %description libs-devel -l pl.UTF-8 | |
165 | Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach | |
166 | Bluetooth. | |
167 | ||
168 | %package libs-static | |
169 | Summary: Static Bluetooth libraries | |
170 | Summary(pl.UTF-8): Biblioteki statyczne Bluetooth | |
171 | Group: Development/Libraries | |
172 | Requires: %{name}-libs-devel = %{version}-%{release} | |
173 | Obsoletes: bluez-sdp-static < 2 | |
174 | ||
175 | %description libs-static | |
176 | bluez-libs-static contains development static libraries for use in | |
177 | Bluetooth applications. | |
178 | ||
179 | %description libs-static -l pl.UTF-8 | |
180 | Ten pakiet zawiera biblioteki statyczne, których można używać do | |
181 | aplikacji Bluetooth. | |
182 | ||
183 | %prep | |
184 | %setup -q | |
185 | %patch0 -p1 | |
186 | ||
187 | # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules | |
188 | %{__rm} -r ell | |
189 | ||
190 | %build | |
191 | %{__libtoolize} | |
192 | %{__aclocal} | |
193 | %{__autoconf} | |
194 | %{__autoheader} | |
195 | %{__automake} | |
196 | %configure \ | |
197 | --disable-silent-rules \ | |
198 | --enable-btpclient \ | |
199 | %{?with_deprecated:--enable-deprecated} \ | |
200 | --enable-experimental \ | |
201 | --enable-external-ell \ | |
202 | --enable-external-plugins \ | |
203 | --enable-health \ | |
204 | --enable-hid2hci \ | |
205 | --enable-library \ | |
206 | --enable-tools \ | |
207 | --enable-cups \ | |
208 | --enable-testing \ | |
209 | --enable-mesh \ | |
210 | --enable-midi \ | |
211 | --enable-nfc \ | |
212 | --enable-sap \ | |
213 | --enable-sixaxis \ | |
214 | %{__enable_disable static_libs static} \ | |
215 | --with-udevdir=%{udevdir} \ | |
216 | %{?with_systemd:--with-systemdsystemunitdir=%{systemdunitdir}} \ | |
217 | %{?with_systemd:--with-systemduserunitdir=%{systemduserunitdir}} \ | |
218 | %{!?with_systemd:--disable-systemd} | |
219 | ||
220 | %{__make} \ | |
221 | cupsdir=%{cupsdir} | |
222 | ||
223 | %install | |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ | |
226 | $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth} | |
227 | ||
228 | %{__make} install \ | |
229 | DESTDIR=$RPM_BUILD_ROOT \ | |
230 | cupsdir=%{cupsdir} \ | |
231 | rulesdir=%{udevdir}/rules.d \ | |
232 | udevdir=%{udevdir} | |
233 | ||
234 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth | |
235 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth | |
236 | ||
237 | #serial port connected Broadcom HCIs scripts | |
238 | install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d | |
239 | %{?with_systemd:install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}} | |
240 | install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth | |
241 | ||
242 | # Install the HCI emulator, useful for testing | |
243 | install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth | |
244 | ||
245 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la | |
246 | ||
247 | %clean | |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
250 | %post | |
251 | /sbin/chkconfig --add bluetooth | |
252 | %service bluetooth restart | |
253 | %systemd_post bluetooth.service | |
254 | %systemd_user_post obex.service | |
255 | ||
256 | %preun | |
257 | if [ "$1" = "0" ]; then | |
258 | %service bluetooth stop | |
259 | /sbin/chkconfig --del bluetooth | |
260 | fi | |
261 | %systemd_preun bluetooth.service | |
262 | %systemd_user_preun obex.service | |
263 | ||
264 | %postun | |
265 | %systemd_reload | |
266 | ||
267 | %triggerpostun -- bluez < 5.13-1 | |
268 | %service rfcomm stop | |
269 | /sbin/chkconfig --del rfcomm | |
270 | # bluez < 4.98-3 | |
271 | %systemd_trigger bluetooth.service | |
272 | ||
273 | %post libs -p /sbin/ldconfig | |
274 | %postun libs -p /sbin/ldconfig | |
275 | ||
276 | %files | |
277 | %defattr(644,root,root,755) | |
278 | %doc AUTHORS ChangeLog README | |
279 | %attr(755,root,root) %{_bindir}/bluemoon | |
280 | %attr(755,root,root) %{_bindir}/bluetoothctl | |
281 | %attr(755,root,root) %{_bindir}/btattach | |
282 | %attr(755,root,root) %{_bindir}/btmon | |
283 | %attr(755,root,root) %{_bindir}/hex2hcd | |
284 | %attr(755,root,root) %{_bindir}/isotest | |
285 | %attr(755,root,root) %{_bindir}/l2ping | |
286 | %attr(755,root,root) %{_bindir}/l2test | |
287 | %attr(755,root,root) %{_bindir}/mesh-cfgclient | |
288 | %attr(755,root,root) %{_bindir}/mesh-cfgtest | |
289 | %attr(755,root,root) %{_bindir}/meshctl | |
290 | %attr(755,root,root) %{_bindir}/mpris-proxy | |
291 | %attr(755,root,root) %{_bindir}/rctest | |
292 | %if %{with deprecated} | |
293 | %attr(755,root,root) %{_bindir}/ciptool | |
294 | %attr(755,root,root) %{_bindir}/hciattach | |
295 | %attr(755,root,root) %{_bindir}/hciconfig | |
296 | %attr(755,root,root) %{_bindir}/hcidump | |
297 | %attr(755,root,root) %{_bindir}/hcitool | |
298 | %attr(755,root,root) %{_bindir}/rfcomm | |
299 | %attr(755,root,root) %{_bindir}/sdptool | |
300 | %endif | |
301 | %if "%{_libexecdir}" != "%{_libdir}" | |
302 | %dir %{_libexecdir}/bluetooth | |
303 | %endif | |
304 | %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd | |
305 | %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd | |
306 | %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh | |
307 | %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt | |
308 | %attr(755,root,root) %{_libexecdir}/bluetooth/obexd | |
309 | %dir %{_libdir}/bluetooth | |
310 | %dir %{_libdir}/bluetooth/plugins | |
311 | %dir %{_libdir}/obex | |
312 | %dir %{_libdir}/obex/plugins | |
313 | %dir %{_sysconfdir}/bluetooth | |
314 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf | |
315 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/main.conf | |
316 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/mesh-main.conf | |
317 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf | |
318 | %attr(754,root,root) /etc/rc.d/init.d/bluetooth | |
319 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth | |
320 | %if %{with systemd} | |
321 | %{systemdunitdir}/bluetooth.service | |
322 | %{systemdunitdir}/bluetooth-mesh.service | |
323 | %{systemdunitdir}/btattach-bcm@.service | |
324 | %{systemduserunitdir}/dbus-org.bluez.obex.service | |
325 | %{systemduserunitdir}/obex.service | |
326 | %{_datadir}/dbus-1/services/org.bluez.obex.service | |
327 | %{_datadir}/dbus-1/system-services/org.bluez.service | |
328 | %{_datadir}/dbus-1/system-services/org.bluez.mesh.service | |
329 | %{_datadir}/dbus-1/system.d/bluetooth.conf | |
330 | %{_datadir}/dbus-1/system.d/bluetooth-mesh.conf | |
331 | %endif | |
332 | %attr(755,root,root) %{udevdir}/hid2hci | |
333 | %{udevdir}/rules.d/69-btattach-bcm.rules | |
334 | %{udevdir}/rules.d/97-hid2hci.rules | |
335 | %{_mandir}/man1/bluetoothctl.1* | |
336 | %{_mandir}/man1/bluetoothctl-admin.1* | |
337 | %{_mandir}/man1/bluetoothctl-advertise.1* | |
338 | %{_mandir}/man1/bluetoothctl-endpoint.1* | |
339 | %{_mandir}/man1/bluetoothctl-gatt.1* | |
340 | %{_mandir}/man1/bluetoothctl-mgmt.1* | |
341 | %{_mandir}/man1/bluetoothctl-monitor.1* | |
342 | %{_mandir}/man1/bluetoothctl-player.1* | |
343 | %{_mandir}/man1/bluetoothctl-scan.1* | |
344 | %{_mandir}/man1/bluetoothctl-transport.1* | |
345 | %{_mandir}/man1/btattach.1* | |
346 | %{_mandir}/man1/btmgmt.1* | |
347 | %{_mandir}/man1/btmon.1* | |
348 | %{_mandir}/man1/hid2hci.1* | |
349 | %{_mandir}/man1/isotest.1* | |
350 | %{_mandir}/man1/l2ping.1* | |
351 | %{_mandir}/man1/rctest.1* | |
352 | %if %{with deprecated} | |
353 | %{_mandir}/man1/ciptool.1* | |
354 | %{_mandir}/man1/hciattach.1* | |
355 | %{_mandir}/man1/hciconfig.1* | |
356 | %{_mandir}/man1/hcidump.1* | |
357 | %{_mandir}/man1/hcitool.1* | |
358 | %{_mandir}/man1/rfcomm.1* | |
359 | %{_mandir}/man1/sdptool.1* | |
360 | %endif | |
361 | %{_mandir}/man5/org.bluez.*.5* | |
362 | %{_mandir}/man8/bluetooth-meshd.8* | |
363 | %{_mandir}/man8/bluetoothd.8* | |
364 | ||
365 | %files -n cups-backend-bluetooth | |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth | |
368 | ||
369 | %files -n zsh-completion-bluez | |
370 | %defattr(644,root,root,755) | |
371 | %{zsh_compdir}/_bluetoothctl | |
372 | ||
373 | %files libs | |
374 | %defattr(644,root,root,755) | |
375 | %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.* | |
376 | %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3 | |
377 | ||
378 | %files libs-devel | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_libdir}/libbluetooth.so | |
381 | %{_includedir}/bluetooth | |
382 | %{_pkgconfigdir}/bluez.pc | |
383 | ||
384 | %if %{with static_libs} | |
385 | %files libs-static | |
386 | %defattr(644,root,root,755) | |
387 | %{_libdir}/libbluetooth.a | |
388 | %endif |