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: 8ba89fa8caa8274a6f9056c494596d0c
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: rpmbuild(macros) >= 1.682
41 BuildRequires: systemd-devel
42 BuildRequires: tar >= 1:1.22
43 BuildRequires: udev-devel >= 1:172
45 Requires(post,preun,postun): systemd-units >= 38
46 Requires: %{name}-libs = %{version}-%{release}
47 Requires: dbus-libs >= 1.6
49 Requires: glib2 >= 1:2.28
50 Requires: hwdata >= 0.225
51 Requires: json-c >= 0.13
53 Requires: systemd-units >= 38
54 Requires: udev >= 1:172
55 Provides: bluez-hcidump = %{version}
56 Provides: bluez-utils = %{version}-%{release}
57 Provides: obexd = %{version}
58 Provides: dbus(org.openobex.client)
59 Provides: obex-data-server = %{version}
60 # moved somewhere or dropped?
61 #Obsoletes: alsa-plugins-bluetooth
62 Obsoletes: bluez-hcidump
63 Obsoletes: bluez-hciemu
66 Obsoletes: bluez-systemd
67 Obsoletes: bluez-utils
68 Obsoletes: bluez-utils-init
70 Obsoletes: obex-data-server
71 # moved somewhere or dropped?
72 #Obsoletes: gstreamer-bluetooth < 4.101-3
73 #Obsoletes: gstreamer0.10-bluetooth < 5
74 Conflicts: bluez-bluefw
75 ExcludeArch: s390 s390x
76 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78 # currently lib, not %{_lib} (see cups.spec)
79 %define cupsdir /usr/lib/cups/backend
80 %define udevdir /lib/udev
92 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
94 %description -l pl.UTF-8
102 - skrypty startowe (PLD)
104 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
106 %package -n cups-backend-bluetooth
107 Summary: Bluetooth backend for CUPS
108 Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a
109 Group: Applications/Printing
110 Requires: %{name}-libs = %{version}-%{release}
113 %description -n cups-backend-bluetooth
114 Bluetooth backend for CUPS.
116 %description -n cups-backend-bluetooth -l pl.UTF-8
117 Backend Bluetooth dla CUPS-a.
119 %package -n zsh-completion-bluez
120 Summary: Zsh completion for bluez commands
121 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez
122 Group: Applications/Shells
123 Requires: %{name} = %{version}-%{release}
126 %description -n zsh-completion-bluez
127 Zsh completion for bluez commands (bluezctl utility).
129 %description -n zsh-completion-bluez -l pl.UTF-8
130 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
134 Summary: Bluetooth libraries
135 Summary(pl.UTF-8): Biblioteki Bluetooth
140 Libraries for use in Bluetooth applications.
142 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
144 %description libs -l pl.UTF-8
145 Biblioteki do używania w aplikacjach Bluetooth.
147 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
150 Summary: Header files for Bluetooth applications
151 Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth
152 Group: Development/Libraries
153 Requires: %{name}-libs = %{version}-%{release}
154 Obsoletes: bluez-sdp-devel
156 %description libs-devel
157 bluez-libs-devel contains header files for use in Bluetooth
160 %description libs-devel -l pl.UTF-8
161 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
165 Summary: Static Bluetooth libraries
166 Summary(pl.UTF-8): Biblioteki statyczne Bluetooth
167 Group: Development/Libraries
168 Requires: %{name}-libs-devel = %{version}-%{release}
169 Obsoletes: bluez-sdp-static
171 %description libs-static
172 bluez-libs-static contains development static libraries for use in
173 Bluetooth applications.
175 %description libs-static -l pl.UTF-8
176 Ten pakiet zawiera biblioteki statyczne, których można używać do
183 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
193 --disable-silent-rules \
195 %{?with_deprecated:--enable-deprecated} \
196 --enable-experimental \
197 --enable-external-ell \
210 --with-udevdir=%{udevdir} \
211 --with-systemdsystemunitdir=%{systemdunitdir} \
212 --with-systemduserunitdir=%{systemduserunitdir}
218 rm -rf $RPM_BUILD_ROOT
219 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
220 $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
223 DESTDIR=$RPM_BUILD_ROOT \
225 rulesdir=%{udevdir}/rules.d \
228 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
229 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
231 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
232 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
234 #serial port connected Broadcom HCIs scripts
235 install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d
236 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
237 install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
239 # Install the HCI emulator, useful for testing
240 install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
242 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
243 %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
246 rm -rf $RPM_BUILD_ROOT
249 /sbin/chkconfig --add bluetooth
250 %service bluetooth restart
251 %systemd_post bluetooth.service
254 if [ "$1" = "0" ]; then
255 %service bluetooth stop
256 /sbin/chkconfig --del bluetooth
258 %systemd_preun bluetooth.service
263 %triggerpostun -- bluez < 4.98-3
264 %systemd_trigger bluetooth.service
266 %triggerpostun -- bluez < 5.13-1
268 /sbin/chkconfig --del rfcomm
270 %post libs -p /sbin/ldconfig
271 %postun libs -p /sbin/ldconfig
274 %defattr(644,root,root,755)
275 %doc AUTHORS ChangeLog README
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}/mesh-cfgtest
285 %attr(755,root,root) %{_bindir}/meshctl
286 %attr(755,root,root) %{_bindir}/mpris-proxy
287 %attr(755,root,root) %{_bindir}/rctest
288 %if %{with deprecated}
289 %attr(755,root,root) %{_bindir}/ciptool
290 %attr(755,root,root) %{_bindir}/hciattach
291 %attr(755,root,root) %{_bindir}/hciconfig
292 %attr(755,root,root) %{_bindir}/hcidump
293 %attr(755,root,root) %{_bindir}/hcitool
294 %attr(755,root,root) %{_bindir}/rfcomm
295 %attr(755,root,root) %{_bindir}/sdptool
297 %if "%{_libexecdir}" != "%{_libdir}"
298 %dir %{_libexecdir}/bluetooth
300 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
301 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
302 %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
303 %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
304 %attr(755,root,root) %{_libexecdir}/bluetooth/obexd
305 %dir %{_libdir}/bluetooth
306 %dir %{_libdir}/bluetooth/plugins
307 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
309 %dir %{_libdir}/obex/plugins
310 %dir %{_sysconfdir}/bluetooth
311 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
312 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
313 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
314 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
315 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
316 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
317 %{systemdunitdir}/bluetooth.service
318 %{systemdunitdir}/bluetooth-mesh.service
319 %{systemdunitdir}/btattach-bcm@.service
320 %{systemduserunitdir}/obex.service
321 %{_datadir}/dbus-1/services/org.bluez.obex.service
322 %{_datadir}/dbus-1/system-services/org.bluez.service
323 %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
324 %attr(755,root,root) %{udevdir}/hid2hci
325 %{udevdir}/rules.d/69-btattach-bcm.rules
326 %{udevdir}/rules.d/97-hid2hci.rules
327 %{_mandir}/man1/btattach.1*
328 %{_mandir}/man1/btmon.1*
329 %{_mandir}/man1/hid2hci.1*
330 %{_mandir}/man1/l2ping.1*
331 %{_mandir}/man1/rctest.1*
332 %if %{with deprecated}
333 %{_mandir}/man1/ciptool.1*
334 %{_mandir}/man1/hciattach.1*
335 %{_mandir}/man1/hciconfig.1*
336 %{_mandir}/man1/hcidump.1*
337 %{_mandir}/man1/hcitool.1*
338 %{_mandir}/man1/rfcomm.1*
339 %{_mandir}/man1/sdptool.1*
341 %{_mandir}/man8/bluetooth-meshd.8*
342 %{_mandir}/man8/bluetoothd.8*
344 %files -n cups-backend-bluetooth
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
348 %files -n zsh-completion-bluez
349 %defattr(644,root,root,755)
350 %{zsh_compdir}/_bluetoothctl
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
355 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/libbluetooth.so
360 %{_includedir}/bluetooth
361 %{_pkgconfigdir}/bluez.pc
364 %defattr(644,root,root,755)
365 %{_libdir}/libbluetooth.a