2 # - verify/update bluetooth init script
6 %bcond_without deprecated # deprecated tools (ciptool,hciattach,hciconfig,hcidump,hcitool,rfcomm,sdptool)
8 Summary: Bluetooth utilities
9 Summary(pl.UTF-8): Narzędzia Bluetooth
14 Group: Applications/System
15 Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
16 # Source0-md5: a4c98b6bd2411880cba5930e7f10a1c4
18 Source2: %{name}.sysconfig
19 # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs
20 # as found on some Atom based x86 hardware
21 Source3: 69-btattach-bcm.rules
22 Source4: btattach-bcm@.service
23 Source5: btattach-bcm-service.sh
24 Patch0: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
25 Patch1: glibc2.34.patch
26 URL: http://www.bluez.org/
27 BuildRequires: alsa-lib-devel >= 1.0
28 BuildRequires: autoconf >= 2.60
29 BuildRequires: automake
30 BuildRequires: check-devel >= 0.9.6
31 BuildRequires: cups-devel
32 BuildRequires: dbus-devel >= 1.6
33 BuildRequires: docutils
34 BuildRequires: ell-devel >= 0.39
35 BuildRequires: glib2-devel >= 1:2.28
36 BuildRequires: json-c-devel >= 0.13
37 BuildRequires: libical-devel
38 BuildRequires: libtool
39 BuildRequires: pkgconfig >= 1:0.9.0
40 BuildRequires: readline-devel
41 BuildRequires: rpmbuild(macros) >= 1.682
42 BuildRequires: systemd-devel
43 BuildRequires: tar >= 1:1.22
44 BuildRequires: udev-devel >= 1:172
46 Requires(post,preun,postun): systemd-units >= 38
47 Requires: %{name}-libs = %{version}-%{release}
48 Requires: dbus-libs >= 1.6
50 Requires: glib2 >= 1:2.28
51 Requires: hwdata >= 0.225
52 Requires: json-c >= 0.13
54 Requires: systemd-units >= 38
55 Requires: udev >= 1:172
56 Provides: bluez-hcidump = %{version}
57 Provides: bluez-utils = %{version}-%{release}
58 Provides: obexd = %{version}
59 Provides: dbus(org.openobex.client)
60 Provides: obex-data-server = %{version}
61 # moved somewhere or dropped?
62 #Obsoletes: alsa-plugins-bluetooth
63 Obsoletes: bluez-hcidump
64 Obsoletes: bluez-hciemu
67 Obsoletes: bluez-systemd
68 Obsoletes: bluez-utils
69 Obsoletes: bluez-utils-init
71 Obsoletes: obex-data-server
72 # moved somewhere or dropped?
73 #Obsoletes: gstreamer-bluetooth < 4.101-3
74 #Obsoletes: gstreamer0.10-bluetooth < 5
75 Conflicts: bluez-bluefw
76 ExcludeArch: s390 s390x
77 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79 # currently lib, not %{_lib} (see cups.spec)
80 %define cupsdir /usr/lib/cups/backend
81 %define udevdir /lib/udev
93 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
95 %description -l pl.UTF-8
103 - skrypty startowe (PLD)
105 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
107 %package -n cups-backend-bluetooth
108 Summary: Bluetooth backend for CUPS
109 Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a
110 Group: Applications/Printing
111 Requires: %{name}-libs = %{version}-%{release}
114 %description -n cups-backend-bluetooth
115 Bluetooth backend for CUPS.
117 %description -n cups-backend-bluetooth -l pl.UTF-8
118 Backend Bluetooth dla CUPS-a.
120 %package -n zsh-completion-bluez
121 Summary: Zsh completion for bluez commands
122 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez
123 Group: Applications/Shells
124 Requires: %{name} = %{version}-%{release}
127 %description -n zsh-completion-bluez
128 Zsh completion for bluez commands (bluezctl utility).
130 %description -n zsh-completion-bluez -l pl.UTF-8
131 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
135 Summary: Bluetooth libraries
136 Summary(pl.UTF-8): Biblioteki Bluetooth
141 Libraries for use in Bluetooth applications.
143 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
145 %description libs -l pl.UTF-8
146 Biblioteki do używania w aplikacjach Bluetooth.
148 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
151 Summary: Header files for Bluetooth applications
152 Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth
153 Group: Development/Libraries
154 Requires: %{name}-libs = %{version}-%{release}
155 Obsoletes: bluez-sdp-devel
157 %description libs-devel
158 bluez-libs-devel contains header files for use in Bluetooth
161 %description libs-devel -l pl.UTF-8
162 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
166 Summary: Static Bluetooth libraries
167 Summary(pl.UTF-8): Biblioteki statyczne Bluetooth
168 Group: Development/Libraries
169 Requires: %{name}-libs-devel = %{version}-%{release}
170 Obsoletes: bluez-sdp-static
172 %description libs-static
173 bluez-libs-static contains development static libraries for use in
174 Bluetooth applications.
176 %description libs-static -l pl.UTF-8
177 Ten pakiet zawiera biblioteki statyczne, których można używać do
185 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
195 --disable-silent-rules \
197 %{?with_deprecated:--enable-deprecated} \
198 --enable-experimental \
199 --enable-external-ell \
212 --with-udevdir=%{udevdir} \
213 --with-systemdsystemunitdir=%{systemdunitdir} \
214 --with-systemduserunitdir=%{systemduserunitdir}
220 rm -rf $RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
222 $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
225 DESTDIR=$RPM_BUILD_ROOT \
227 rulesdir=%{udevdir}/rules.d \
230 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
231 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
233 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
234 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
236 #serial port connected Broadcom HCIs scripts
237 install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d
238 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
239 install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
241 # Install the HCI emulator, useful for testing
242 install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
244 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
245 %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
248 rm -rf $RPM_BUILD_ROOT
251 /sbin/chkconfig --add bluetooth
252 %service bluetooth restart
253 %systemd_post bluetooth.service
256 if [ "$1" = "0" ]; then
257 %service bluetooth stop
258 /sbin/chkconfig --del bluetooth
260 %systemd_preun bluetooth.service
265 %triggerpostun -- bluez < 4.98-3
266 %systemd_trigger bluetooth.service
268 %triggerpostun -- bluez < 5.13-1
270 /sbin/chkconfig --del rfcomm
272 %post libs -p /sbin/ldconfig
273 %postun libs -p /sbin/ldconfig
276 %defattr(644,root,root,755)
277 %doc AUTHORS ChangeLog README
278 %attr(755,root,root) %{_bindir}/bluemoon
279 %attr(755,root,root) %{_bindir}/bluetoothctl
280 %attr(755,root,root) %{_bindir}/btattach
281 %attr(755,root,root) %{_bindir}/btmon
282 %attr(755,root,root) %{_bindir}/hex2hcd
283 %attr(755,root,root) %{_bindir}/l2ping
284 %attr(755,root,root) %{_bindir}/l2test
285 %attr(755,root,root) %{_bindir}/mesh-cfgclient
286 %attr(755,root,root) %{_bindir}/mesh-cfgtest
287 %attr(755,root,root) %{_bindir}/meshctl
288 %attr(755,root,root) %{_bindir}/mpris-proxy
289 %attr(755,root,root) %{_bindir}/rctest
290 %if %{with deprecated}
291 %attr(755,root,root) %{_bindir}/ciptool
292 %attr(755,root,root) %{_bindir}/hciattach
293 %attr(755,root,root) %{_bindir}/hciconfig
294 %attr(755,root,root) %{_bindir}/hcidump
295 %attr(755,root,root) %{_bindir}/hcitool
296 %attr(755,root,root) %{_bindir}/rfcomm
297 %attr(755,root,root) %{_bindir}/sdptool
299 %if "%{_libexecdir}" != "%{_libdir}"
300 %dir %{_libexecdir}/bluetooth
302 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
303 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
304 %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
305 %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
306 %attr(755,root,root) %{_libexecdir}/bluetooth/obexd
307 %dir %{_libdir}/bluetooth
308 %dir %{_libdir}/bluetooth/plugins
309 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
311 %dir %{_libdir}/obex/plugins
312 %dir %{_sysconfdir}/bluetooth
313 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
314 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
315 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
316 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
317 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
318 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
319 %{systemdunitdir}/bluetooth.service
320 %{systemdunitdir}/bluetooth-mesh.service
321 %{systemdunitdir}/btattach-bcm@.service
322 %{systemduserunitdir}/obex.service
323 %{_datadir}/dbus-1/services/org.bluez.obex.service
324 %{_datadir}/dbus-1/system-services/org.bluez.service
325 %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
326 %attr(755,root,root) %{udevdir}/hid2hci
327 %{udevdir}/rules.d/69-btattach-bcm.rules
328 %{udevdir}/rules.d/97-hid2hci.rules
329 %{_mandir}/man1/btattach.1*
330 %{_mandir}/man1/btmon.1*
331 %{_mandir}/man1/hid2hci.1*
332 %{_mandir}/man1/l2ping.1*
333 %{_mandir}/man1/rctest.1*
334 %if %{with deprecated}
335 %{_mandir}/man1/ciptool.1*
336 %{_mandir}/man1/hciattach.1*
337 %{_mandir}/man1/hciconfig.1*
338 %{_mandir}/man1/hcidump.1*
339 %{_mandir}/man1/hcitool.1*
340 %{_mandir}/man1/rfcomm.1*
341 %{_mandir}/man1/sdptool.1*
343 %{_mandir}/man8/bluetooth-meshd.8*
344 %{_mandir}/man8/bluetoothd.8*
346 %files -n cups-backend-bluetooth
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
350 %files -n zsh-completion-bluez
351 %defattr(644,root,root,755)
352 %{zsh_compdir}/_bluetoothctl
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
357 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/libbluetooth.so
362 %{_includedir}/bluetooth
363 %{_pkgconfigdir}/bluez.pc
366 %defattr(644,root,root,755)
367 %{_libdir}/libbluetooth.a