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: 94972b8bc7ade60c72b0ffa6ccff2c0a
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: ell-devel >= 0.28
33 BuildRequires: glib2-devel >= 1:2.28
34 BuildRequires: json-c-devel >= 0.13
35 BuildRequires: libical-devel
36 BuildRequires: libtool
37 BuildRequires: pkgconfig >= 1:0.9.0
38 BuildRequires: readline-devel
39 BuildRequires: rpmbuild(macros) >= 1.682
40 BuildRequires: systemd-devel
41 BuildRequires: tar >= 1:1.22
42 BuildRequires: udev-devel >= 1:172
44 Requires(post,preun,postun): systemd-units >= 38
45 Requires: %{name}-libs = %{version}-%{release}
46 Requires: dbus-libs >= 1.6
48 Requires: glib2 >= 1:2.28
49 Requires: hwdata >= 0.225
50 Requires: json-c >= 0.13
52 Requires: systemd-units >= 38
53 Requires: udev >= 1:172
54 Provides: bluez-hcidump = %{version}
55 Provides: bluez-utils = %{version}-%{release}
56 Provides: obexd = %{version}
57 Provides: dbus(org.openobex.client)
58 Provides: obex-data-server = %{version}
59 # moved somewhere or dropped?
60 #Obsoletes: alsa-plugins-bluetooth
61 Obsoletes: bluez-hcidump
62 Obsoletes: bluez-hciemu
65 Obsoletes: bluez-systemd
66 Obsoletes: bluez-utils
67 Obsoletes: bluez-utils-init
69 Obsoletes: obex-data-server
70 # moved somewhere or dropped?
71 #Obsoletes: gstreamer-bluetooth < 4.101-3
72 #Obsoletes: gstreamer0.10-bluetooth < 5
73 Conflicts: bluez-bluefw
74 ExcludeArch: s390 s390x
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 # currently lib, not %{_lib} (see cups.spec)
78 %define cupsdir /usr/lib/cups/backend
79 %define udevdir /lib/udev
91 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
93 %description -l pl.UTF-8
101 - skrypty startowe (PLD)
103 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
105 %package -n cups-backend-bluetooth
106 Summary: Bluetooth backend for CUPS
107 Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a
108 Group: Applications/Printing
109 Requires: %{name}-libs = %{version}-%{release}
112 %description -n cups-backend-bluetooth
113 Bluetooth backend for CUPS.
115 %description -n cups-backend-bluetooth -l pl.UTF-8
116 Backend Bluetooth dla CUPS-a.
118 %package -n zsh-completion-bluez
119 Summary: Zsh completion for bluez commands
120 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez
121 Group: Applications/Shells
122 Requires: %{name} = %{version}-%{release}
125 %description -n zsh-completion-bluez
126 Zsh completion for bluez commands (bluezctl utility).
128 %description -n zsh-completion-bluez -l pl.UTF-8
129 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
133 Summary: Bluetooth libraries
134 Summary(pl.UTF-8): Biblioteki Bluetooth
139 Libraries for use in Bluetooth applications.
141 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
143 %description libs -l pl.UTF-8
144 Biblioteki do używania w aplikacjach Bluetooth.
146 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
149 Summary: Header files for Bluetooth applications
150 Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth
151 Group: Development/Libraries
152 Requires: %{name}-libs = %{version}-%{release}
153 Obsoletes: bluez-sdp-devel
155 %description libs-devel
156 bluez-libs-devel contains header files for use in Bluetooth
159 %description libs-devel -l pl.UTF-8
160 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
164 Summary: Static Bluetooth libraries
165 Summary(pl.UTF-8): Biblioteki statyczne Bluetooth
166 Group: Development/Libraries
167 Requires: %{name}-libs-devel = %{version}-%{release}
168 Obsoletes: bluez-sdp-static
170 %description libs-static
171 bluez-libs-static contains development static libraries for use in
172 Bluetooth applications.
174 %description libs-static -l pl.UTF-8
175 Ten pakiet zawiera biblioteki statyczne, których można używać do
182 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
192 --disable-silent-rules \
194 %{?with_deprecated:--enable-deprecated} \
195 --enable-experimental \
196 --enable-external-ell \
209 --with-udevdir=%{udevdir} \
210 --with-systemdsystemunitdir=%{systemdunitdir} \
211 --with-systemduserunitdir=%{systemduserunitdir}
217 rm -rf $RPM_BUILD_ROOT
218 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
219 $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
222 DESTDIR=$RPM_BUILD_ROOT \
224 rulesdir=%{udevdir}/rules.d \
227 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
228 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
230 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
231 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
233 #serial port connected Broadcom HCIs scripts
234 install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d
235 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
236 install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
238 # Install the HCI emulator, useful for testing
239 install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
241 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
242 %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
245 rm -rf $RPM_BUILD_ROOT
248 /sbin/chkconfig --add bluetooth
249 %service bluetooth restart
250 %systemd_post bluetooth.service
253 if [ "$1" = "0" ]; then
254 %service bluetooth stop
255 /sbin/chkconfig --del bluetooth
257 %systemd_preun bluetooth.service
262 %triggerpostun -- bluez < 4.98-3
263 %systemd_trigger bluetooth.service
265 %triggerpostun -- bluez < 5.13-1
267 /sbin/chkconfig --del rfcomm
269 %post libs -p /sbin/ldconfig
270 %postun libs -p /sbin/ldconfig
273 %defattr(644,root,root,755)
274 %doc AUTHORS ChangeLog README
275 %attr(755,root,root) %{_bindir}/bccmd
276 %attr(755,root,root) %{_bindir}/bluemoon
277 %attr(755,root,root) %{_bindir}/bluetoothctl
278 %attr(755,root,root) %{_bindir}/btattach
279 %attr(755,root,root) %{_bindir}/btmon
280 %attr(755,root,root) %{_bindir}/hex2hcd
281 %attr(755,root,root) %{_bindir}/l2ping
282 %attr(755,root,root) %{_bindir}/l2test
283 %attr(755,root,root) %{_bindir}/mesh-cfgclient
284 %attr(755,root,root) %{_bindir}/meshctl
285 %attr(755,root,root) %{_bindir}/mpris-proxy
286 %attr(755,root,root) %{_bindir}/rctest
287 %if %{with deprecated}
288 %attr(755,root,root) %{_bindir}/ciptool
289 %attr(755,root,root) %{_bindir}/hciattach
290 %attr(755,root,root) %{_bindir}/hciconfig
291 %attr(755,root,root) %{_bindir}/hcidump
292 %attr(755,root,root) %{_bindir}/hcitool
293 %attr(755,root,root) %{_bindir}/rfcomm
294 %attr(755,root,root) %{_bindir}/sdptool
296 %if "%{_libexecdir}" != "%{_libdir}"
297 %dir %{_libexecdir}/bluetooth
299 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
300 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
301 %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
302 %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
303 %attr(755,root,root) %{_libexecdir}/bluetooth/obexd
304 %dir %{_libdir}/bluetooth
305 %dir %{_libdir}/bluetooth/plugins
306 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
308 %dir %{_libdir}/obex/plugins
309 %dir %{_sysconfdir}/bluetooth
310 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
311 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
312 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
314 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
315 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
316 %{systemdunitdir}/bluetooth.service
317 %{systemdunitdir}/bluetooth-mesh.service
318 %{systemdunitdir}/btattach-bcm@.service
319 %{systemduserunitdir}/obex.service
320 %{_datadir}/dbus-1/services/org.bluez.obex.service
321 %{_datadir}/dbus-1/system-services/org.bluez.service
322 %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
323 %attr(755,root,root) %{udevdir}/hid2hci
324 %{udevdir}/rules.d/69-btattach-bcm.rules
325 %{udevdir}/rules.d/97-hid2hci.rules
326 %{_mandir}/man1/bccmd.1*
327 %{_mandir}/man1/btattach.1*
328 %{_mandir}/man1/hid2hci.1*
329 %{_mandir}/man1/l2ping.1*
330 %{_mandir}/man1/rctest.1*
331 %if %{with deprecated}
332 %{_mandir}/man1/ciptool.1*
333 %{_mandir}/man1/hciattach.1*
334 %{_mandir}/man1/hciconfig.1*
335 %{_mandir}/man1/hcidump.1*
336 %{_mandir}/man1/hcitool.1*
337 %{_mandir}/man1/rfcomm.1*
338 %{_mandir}/man1/sdptool.1*
340 %{_mandir}/man8/bluetoothd.8*
342 %files -n cups-backend-bluetooth
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
346 %files -n zsh-completion-bluez
347 %defattr(644,root,root,755)
348 %{zsh_compdir}/_bluetoothctl
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
353 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libbluetooth.so
358 %{_includedir}/bluetooth
359 %{_pkgconfigdir}/bluez.pc
362 %defattr(644,root,root,755)
363 %{_libdir}/libbluetooth.a