2 # - verify/update bluetooth init script
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
10 Summary: Bluetooth utilities
11 Summary(pl.UTF-8): Narzędzia Bluetooth
16 Group: Applications/System
17 Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
18 # Source0-md5: 7812034c8b91bf11e4f1379734756a3b
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
48 Requires(post,preun,postun): systemd-units >= 1:250.1
49 Requires: %{name}-libs = %{version}-%{release}
50 Requires: dbus-libs >= 1.10
52 Requires: glib2 >= 1:2.28
53 Requires: hwdata >= 0.225
54 Requires: json-c >= 0.13
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
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)
81 # currently lib, not %{_lib} (see cups.spec)
82 %define cupsdir /usr/lib/cups/backend
83 %define udevdir /lib/udev
95 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
97 %description -l pl.UTF-8
105 - skrypty startowe (PLD)
107 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
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}
116 %description -n cups-backend-bluetooth
117 Bluetooth backend for CUPS.
119 %description -n cups-backend-bluetooth -l pl.UTF-8
120 Backend Bluetooth dla CUPS-a.
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}
130 %description -n zsh-completion-bluez
131 Zsh completion for bluez commands (bluezctl utility).
133 %description -n zsh-completion-bluez -l pl.UTF-8
134 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
138 Summary: Bluetooth libraries
139 Summary(pl.UTF-8): Biblioteki Bluetooth
141 Obsoletes: bluez-sdp < 2
144 Libraries for use in Bluetooth applications.
146 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
148 %description libs -l pl.UTF-8
149 Biblioteki do używania w aplikacjach Bluetooth.
151 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
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
160 %description libs-devel
161 bluez-libs-devel contains header files for use in Bluetooth
164 %description libs-devel -l pl.UTF-8
165 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
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
175 %description libs-static
176 bluez-libs-static contains development static libraries for use in
177 Bluetooth applications.
179 %description libs-static -l pl.UTF-8
180 Ten pakiet zawiera biblioteki statyczne, których można używać do
187 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
197 --disable-silent-rules \
199 %{?with_deprecated:--enable-deprecated} \
200 --enable-experimental \
201 --enable-external-ell \
202 --enable-external-plugins \
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}
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}
229 DESTDIR=$RPM_BUILD_ROOT \
231 rulesdir=%{udevdir}/rules.d \
234 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
235 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
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
242 # Install the HCI emulator, useful for testing
243 install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
245 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
248 rm -rf $RPM_BUILD_ROOT
251 /sbin/chkconfig --add bluetooth
252 %service bluetooth restart
253 %systemd_post bluetooth.service
254 %systemd_user_post obex.service
257 if [ "$1" = "0" ]; then
258 %service bluetooth stop
259 /sbin/chkconfig --del bluetooth
261 %systemd_preun bluetooth.service
262 %systemd_user_preun obex.service
267 %triggerpostun -- bluez < 5.13-1
269 /sbin/chkconfig --del rfcomm
271 %systemd_trigger bluetooth.service
273 %post libs -p /sbin/ldconfig
274 %postun libs -p /sbin/ldconfig
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
301 %if "%{_libexecdir}" != "%{_libdir}"
302 %dir %{_libexecdir}/bluetooth
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
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
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
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*
361 %{_mandir}/man5/org.bluez.*.5*
362 %{_mandir}/man8/bluetooth-meshd.8*
363 %{_mandir}/man8/bluetoothd.8*
365 %files -n cups-backend-bluetooth
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
369 %files -n zsh-completion-bluez
370 %defattr(644,root,root,755)
371 %{zsh_compdir}/_bluetoothctl
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
376 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libbluetooth.so
381 %{_includedir}/bluetooth
382 %{_pkgconfigdir}/bluez.pc
384 %if %{with static_libs}
386 %defattr(644,root,root,755)
387 %{_libdir}/libbluetooth.a