2 # - verify/update bluetooth init script
6 %bcond_without deprecated # deprecated tools (ciptool,hciattach,hciconfig,hcidump,hcitool,rfcomm,sdptool)
7 %bcond_without systemd # systemd
9 Summary: Bluetooth utilities
10 Summary(pl.UTF-8): Narzędzia Bluetooth
15 Group: Applications/System
16 Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
17 # Source0-md5: a05a6c133d3bf6dc1d1c6c46a9704312
19 Source2: %{name}.sysconfig
20 # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs
21 # as found on some Atom based x86 hardware
22 Source3: 69-btattach-bcm.rules
23 Source4: btattach-bcm@.service
24 Source5: btattach-bcm-service.sh
25 Patch0: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.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.10
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: rpm-build >= 4.6
42 BuildRequires: rpmbuild(macros) >= 2.011
43 %{?with_systemd:BuildRequires: systemd-devel}
44 BuildRequires: tar >= 1:1.22
45 BuildRequires: udev-devel >= 1:172
47 Requires(post,preun,postun): systemd-units >= 1:250.1
48 Requires: %{name}-libs = %{version}-%{release}
49 Requires: dbus-libs >= 1.10
51 Requires: glib2 >= 1:2.28
52 Requires: hwdata >= 0.225
53 Requires: json-c >= 0.13
55 Requires: systemd-units >= 1:250.1
56 Requires: udev >= 1:172
57 Provides: bluez-hcidump = %{version}
58 Provides: bluez-utils = %{version}-%{release}
59 Provides: obexd = %{version}
60 Provides: dbus(org.openobex.client)
61 Provides: obex-data-server = %{version}
62 # moved somewhere or dropped?
63 #Obsoletes: alsa-plugins-bluetooth
64 Obsoletes: bluez-hcidump < 3
65 Obsoletes: bluez-hciemu < 2
66 Obsoletes: bluez-pan < 2
67 Obsoletes: bluez-sdp < 2
68 Obsoletes: bluez-systemd < 4.98-3
69 Obsoletes: bluez-utils < 4
70 Obsoletes: bluez-utils-init < 4
72 Obsoletes: obex-data-server < 1
73 # moved somewhere or dropped?
74 #Obsoletes: gstreamer-bluetooth < 4.101-3
75 #Obsoletes: gstreamer0.10-bluetooth < 5
76 Conflicts: bluez-bluefw
77 ExcludeArch: s390 s390x
78 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80 # currently lib, not %{_lib} (see cups.spec)
81 %define cupsdir /usr/lib/cups/backend
82 %define udevdir /lib/udev
94 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
96 %description -l pl.UTF-8
104 - skrypty startowe (PLD)
106 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
108 %package -n cups-backend-bluetooth
109 Summary: Bluetooth backend for CUPS
110 Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a
111 Group: Applications/Printing
112 Requires: %{name}-libs = %{version}-%{release}
115 %description -n cups-backend-bluetooth
116 Bluetooth backend for CUPS.
118 %description -n cups-backend-bluetooth -l pl.UTF-8
119 Backend Bluetooth dla CUPS-a.
121 %package -n zsh-completion-bluez
122 Summary: Zsh completion for bluez commands
123 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez
124 Group: Applications/Shells
125 Requires: %{name} = %{version}-%{release}
129 %description -n zsh-completion-bluez
130 Zsh completion for bluez commands (bluezctl utility).
132 %description -n zsh-completion-bluez -l pl.UTF-8
133 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
137 Summary: Bluetooth libraries
138 Summary(pl.UTF-8): Biblioteki Bluetooth
140 Obsoletes: bluez-sdp < 2
143 Libraries for use in Bluetooth applications.
145 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
147 %description libs -l pl.UTF-8
148 Biblioteki do używania w aplikacjach Bluetooth.
150 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
153 Summary: Header files for Bluetooth applications
154 Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth
155 Group: Development/Libraries
156 Requires: %{name}-libs = %{version}-%{release}
157 Obsoletes: bluez-sdp-devel < 2
159 %description libs-devel
160 bluez-libs-devel contains header files for use in Bluetooth
163 %description libs-devel -l pl.UTF-8
164 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
168 Summary: Static Bluetooth libraries
169 Summary(pl.UTF-8): Biblioteki statyczne Bluetooth
170 Group: Development/Libraries
171 Requires: %{name}-libs-devel = %{version}-%{release}
172 Obsoletes: bluez-sdp-static < 2
174 %description libs-static
175 bluez-libs-static contains development static libraries for use in
176 Bluetooth applications.
178 %description libs-static -l pl.UTF-8
179 Ten pakiet zawiera biblioteki statyczne, których można używać do
186 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
196 --disable-silent-rules \
198 %{?with_deprecated:--enable-deprecated} \
199 --enable-experimental \
200 --enable-external-ell \
213 --with-udevdir=%{udevdir} \
214 %{?with_systemd:--with-systemdsystemunitdir=%{systemdunitdir}} \
215 %{?with_systemd:--with-systemduserunitdir=%{systemduserunitdir}} \
216 %{!?with_systemd:--disable-systemd}
222 rm -rf $RPM_BUILD_ROOT
223 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
224 $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
227 DESTDIR=$RPM_BUILD_ROOT \
229 rulesdir=%{udevdir}/rules.d \
232 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
233 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
235 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
236 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
238 #serial port connected Broadcom HCIs scripts
239 install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d
240 %{?with_systemd:install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}}
241 install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
243 # Install the HCI emulator, useful for testing
244 install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
246 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
247 %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
250 rm -rf $RPM_BUILD_ROOT
253 /sbin/chkconfig --add bluetooth
254 %service bluetooth restart
255 %systemd_post bluetooth.service
256 %systemd_user_post obex.service
259 if [ "$1" = "0" ]; then
260 %service bluetooth stop
261 /sbin/chkconfig --del bluetooth
263 %systemd_preun bluetooth.service
264 %systemd_user_preun obex.service
269 %triggerpostun -- bluez < 5.13-1
271 /sbin/chkconfig --del rfcomm
273 %systemd_trigger bluetooth.service
275 %post libs -p /sbin/ldconfig
276 %postun libs -p /sbin/ldconfig
279 %defattr(644,root,root,755)
280 %doc AUTHORS ChangeLog README
281 %attr(755,root,root) %{_bindir}/bluemoon
282 %attr(755,root,root) %{_bindir}/bluetoothctl
283 %attr(755,root,root) %{_bindir}/btattach
284 %attr(755,root,root) %{_bindir}/btmon
285 %attr(755,root,root) %{_bindir}/hex2hcd
286 %attr(755,root,root) %{_bindir}/isotest
287 %attr(755,root,root) %{_bindir}/l2ping
288 %attr(755,root,root) %{_bindir}/l2test
289 %attr(755,root,root) %{_bindir}/mesh-cfgclient
290 %attr(755,root,root) %{_bindir}/mesh-cfgtest
291 %attr(755,root,root) %{_bindir}/meshctl
292 %attr(755,root,root) %{_bindir}/mpris-proxy
293 %attr(755,root,root) %{_bindir}/rctest
294 %if %{with deprecated}
295 %attr(755,root,root) %{_bindir}/ciptool
296 %attr(755,root,root) %{_bindir}/hciattach
297 %attr(755,root,root) %{_bindir}/hciconfig
298 %attr(755,root,root) %{_bindir}/hcidump
299 %attr(755,root,root) %{_bindir}/hcitool
300 %attr(755,root,root) %{_bindir}/rfcomm
301 %attr(755,root,root) %{_bindir}/sdptool
303 %if "%{_libexecdir}" != "%{_libdir}"
304 %dir %{_libexecdir}/bluetooth
306 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
307 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
308 %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
309 %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
310 %attr(755,root,root) %{_libexecdir}/bluetooth/obexd
311 %dir %{_libdir}/bluetooth
312 %dir %{_libdir}/bluetooth/plugins
313 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
315 %dir %{_libdir}/obex/plugins
316 %dir %{_sysconfdir}/bluetooth
317 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
318 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
319 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
320 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
322 %{systemdunitdir}/bluetooth.service
323 %{systemdunitdir}/bluetooth-mesh.service
324 %{systemdunitdir}/btattach-bcm@.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-mgmt.1*
336 %{_mandir}/man1/bluetoothctl-monitor.1*
337 %{_mandir}/man1/btattach.1*
338 %{_mandir}/man1/btmgmt.1*
339 %{_mandir}/man1/btmon.1*
340 %{_mandir}/man1/hid2hci.1*
341 %{_mandir}/man1/isotest.1*
342 %{_mandir}/man1/l2ping.1*
343 %{_mandir}/man1/rctest.1*
344 %if %{with deprecated}
345 %{_mandir}/man1/ciptool.1*
346 %{_mandir}/man1/hciattach.1*
347 %{_mandir}/man1/hciconfig.1*
348 %{_mandir}/man1/hcidump.1*
349 %{_mandir}/man1/hcitool.1*
350 %{_mandir}/man1/rfcomm.1*
351 %{_mandir}/man1/sdptool.1*
353 %{_mandir}/man8/bluetooth-meshd.8*
354 %{_mandir}/man8/bluetoothd.8*
356 %files -n cups-backend-bluetooth
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
360 %files -n zsh-completion-bluez
361 %defattr(644,root,root,755)
362 %{zsh_compdir}/_bluetoothctl
365 %defattr(644,root,root,755)
366 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
367 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_libdir}/libbluetooth.so
372 %{_includedir}/bluetooth
373 %{_pkgconfigdir}/bluez.pc
376 %defattr(644,root,root,755)
377 %{_libdir}/libbluetooth.a