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: 00a72fed12e706b2d8bb40786154d3aa
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 URL: http://www.bluez.org/
26 BuildRequires: alsa-lib-devel >= 1.0
27 BuildRequires: autoconf >= 2.60
28 BuildRequires: automake
29 BuildRequires: check-devel >= 0.9.6
30 BuildRequires: cups-devel
31 BuildRequires: dbus-devel >= 1.6
32 BuildRequires: docutils
33 BuildRequires: ell-devel >= 0.39
34 BuildRequires: glib2-devel >= 1:2.28
35 BuildRequires: json-c-devel >= 0.13
36 BuildRequires: libical-devel
37 BuildRequires: libtool
38 BuildRequires: pkgconfig >= 1:0.9.0
39 BuildRequires: readline-devel
40 BuildRequires: rpm-build >= 4.6
41 BuildRequires: rpmbuild(macros) >= 2.011
42 BuildRequires: systemd-devel
43 BuildRequires: tar >= 1:1.22
44 BuildRequires: udev-devel >= 1:172
46 Requires(post,preun,postun): systemd-units >= 1:250.1
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 >= 1:250.1
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 < 3
64 Obsoletes: bluez-hciemu < 2
65 Obsoletes: bluez-pan < 2
66 Obsoletes: bluez-sdp < 2
67 Obsoletes: bluez-systemd < 4.98-3
68 Obsoletes: bluez-utils < 4
69 Obsoletes: bluez-utils-init < 4
71 Obsoletes: obex-data-server < 1
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}
128 %description -n zsh-completion-bluez
129 Zsh completion for bluez commands (bluezctl utility).
131 %description -n zsh-completion-bluez -l pl.UTF-8
132 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
136 Summary: Bluetooth libraries
137 Summary(pl.UTF-8): Biblioteki Bluetooth
139 Obsoletes: bluez-sdp < 2
142 Libraries for use in Bluetooth applications.
144 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
146 %description libs -l pl.UTF-8
147 Biblioteki do używania w aplikacjach Bluetooth.
149 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
152 Summary: Header files for Bluetooth applications
153 Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth
154 Group: Development/Libraries
155 Requires: %{name}-libs = %{version}-%{release}
156 Obsoletes: bluez-sdp-devel < 2
158 %description libs-devel
159 bluez-libs-devel contains header files for use in Bluetooth
162 %description libs-devel -l pl.UTF-8
163 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
167 Summary: Static Bluetooth libraries
168 Summary(pl.UTF-8): Biblioteki statyczne Bluetooth
169 Group: Development/Libraries
170 Requires: %{name}-libs-devel = %{version}-%{release}
171 Obsoletes: bluez-sdp-static < 2
173 %description libs-static
174 bluez-libs-static contains development static libraries for use in
175 Bluetooth applications.
177 %description libs-static -l pl.UTF-8
178 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
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
311 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
313 %dir %{_libdir}/obex/plugins
314 %dir %{_sysconfdir}/bluetooth
315 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
316 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
317 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
318 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
319 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
320 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
321 %{systemdunitdir}/bluetooth.service
322 %{systemdunitdir}/bluetooth-mesh.service
323 %{systemdunitdir}/btattach-bcm@.service
324 %{systemduserunitdir}/obex.service
325 %{_datadir}/dbus-1/services/org.bluez.obex.service
326 %{_datadir}/dbus-1/system-services/org.bluez.service
327 %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
328 %attr(755,root,root) %{udevdir}/hid2hci
329 %{udevdir}/rules.d/69-btattach-bcm.rules
330 %{udevdir}/rules.d/97-hid2hci.rules
331 %{_mandir}/man1/btattach.1*
332 %{_mandir}/man1/btmon.1*
333 %{_mandir}/man1/hid2hci.1*
334 %{_mandir}/man1/isotest.1*
335 %{_mandir}/man1/l2ping.1*
336 %{_mandir}/man1/rctest.1*
337 %if %{with deprecated}
338 %{_mandir}/man1/ciptool.1*
339 %{_mandir}/man1/hciattach.1*
340 %{_mandir}/man1/hciconfig.1*
341 %{_mandir}/man1/hcidump.1*
342 %{_mandir}/man1/hcitool.1*
343 %{_mandir}/man1/rfcomm.1*
344 %{_mandir}/man1/sdptool.1*
346 %{_mandir}/man8/bluetooth-meshd.8*
347 %{_mandir}/man8/bluetoothd.8*
349 %files -n cups-backend-bluetooth
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
353 %files -n zsh-completion-bluez
354 %defattr(644,root,root,755)
355 %{zsh_compdir}/_bluetoothctl
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
360 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/libbluetooth.so
365 %{_includedir}/bluetooth
366 %{_pkgconfigdir}/bluez.pc
369 %defattr(644,root,root,755)
370 %{_libdir}/libbluetooth.a