]>
Commit | Line | Data |
---|---|---|
886fa953 JB |
1 | # TODO: |
2 | # - verify/update bluetooth init script | |
d358118c | 3 | # - separate obex? |
b7b1b136 JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without deprecated # deprecated tools (ciptool,hciattach,hciconfig,hcidump,hcitool,rfcomm,sdptool) | |
70dfe498 | 7 | %bcond_without static_libs # static library |
d63e2873 | 8 | %bcond_without systemd # systemd |
b7b1b136 | 9 | # |
8e2aef6c AM |
10 | Summary: Bluetooth utilities |
11 | Summary(pl.UTF-8): Narzędzia Bluetooth | |
12 | Name: bluez | |
54e0667c | 13 | Version: 5.73 |
180032fd | 14 | Release: 1 |
8e2aef6c AM |
15 | License: GPL v2+ |
16 | Group: Applications/System | |
6feb4e6d | 17 | Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz |
54e0667c | 18 | # Source0-md5: 7812034c8b91bf11e4f1379734756a3b |
8e2aef6c AM |
19 | Source1: %{name}.init |
20 | Source2: %{name}.sysconfig | |
477801c9 JR |
21 | # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs |
22 | # as found on some Atom based x86 hardware | |
23 | Source3: 69-btattach-bcm.rules | |
24 | Source4: btattach-bcm@.service | |
25 | Source5: btattach-bcm-service.sh | |
26 | Patch0: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch | |
8e2aef6c | 27 | URL: http://www.bluez.org/ |
b7b1b136 | 28 | BuildRequires: alsa-lib-devel >= 1.0 |
b0a62422 | 29 | BuildRequires: autoconf >= 2.60 |
8e2aef6c | 30 | BuildRequires: automake |
f288002d | 31 | BuildRequires: check-devel >= 0.9.6 |
477801c9 | 32 | BuildRequires: cups-devel |
4fe0829b | 33 | BuildRequires: dbus-devel >= 1.10 |
649d5a09 | 34 | BuildRequires: docutils |
41be8c17 | 35 | BuildRequires: ell-devel >= 0.39 |
0ff69826 | 36 | BuildRequires: glib2-devel >= 1:2.28 |
f072e9cd | 37 | BuildRequires: json-c-devel >= 0.13 |
886fa953 | 38 | BuildRequires: libical-devel |
8e2aef6c | 39 | BuildRequires: libtool |
8e2aef6c | 40 | BuildRequires: pkgconfig >= 1:0.9.0 |
9980fdad | 41 | BuildRequires: readline-devel |
24cdf5f2 | 42 | BuildRequires: rpm-build >= 4.6 |
5f69477c | 43 | BuildRequires: rpmbuild(macros) >= 2.011 |
d63e2873 | 44 | %{?with_systemd:BuildRequires: systemd-devel} |
886fa953 | 45 | BuildRequires: tar >= 1:1.22 |
54e0667c | 46 | BuildRequires: udev-devel >= 1:196 |
886fa953 | 47 | BuildRequires: xz |
f3eba8ca | 48 | Requires(post,preun,postun): systemd-units >= 1:250.1 |
bfe3d974 | 49 | Requires: %{name}-libs = %{version}-%{release} |
4fe0829b | 50 | Requires: dbus-libs >= 1.10 |
41be8c17 | 51 | Requires: ell >= 0.39 |
0ff69826 | 52 | Requires: glib2 >= 1:2.28 |
0416a3b3 | 53 | Requires: hwdata >= 0.225 |
f072e9cd | 54 | Requires: json-c >= 0.13 |
9b3fd779 | 55 | Requires: rc-scripts |
f3eba8ca | 56 | Requires: systemd-units >= 1:250.1 |
54e0667c | 57 | Requires: udev >= 1:196 |
886fa953 | 58 | Provides: bluez-hcidump = %{version} |
bfe3d974 | 59 | Provides: bluez-utils = %{version}-%{release} |
886fa953 | 60 | Provides: obexd = %{version} |
c8deab5a JR |
61 | Provides: dbus(org.openobex.client) |
62 | Provides: obex-data-server = %{version} | |
886fa953 JB |
63 | # moved somewhere or dropped? |
64 | #Obsoletes: alsa-plugins-bluetooth | |
6f85f406 JB |
65 | Obsoletes: bluez-hcidump < 3 |
66 | Obsoletes: bluez-hciemu < 2 | |
67 | Obsoletes: bluez-pan < 2 | |
68 | Obsoletes: bluez-sdp < 2 | |
69 | Obsoletes: bluez-systemd < 4.98-3 | |
70 | Obsoletes: bluez-utils < 4 | |
71 | Obsoletes: bluez-utils-init < 4 | |
72 | Obsoletes: obexd < 1 | |
73 | Obsoletes: obex-data-server < 1 | |
886fa953 JB |
74 | # moved somewhere or dropped? |
75 | #Obsoletes: gstreamer-bluetooth < 4.101-3 | |
76 | #Obsoletes: gstreamer0.10-bluetooth < 5 | |
8e2aef6c AM |
77 | Conflicts: bluez-bluefw |
78 | ExcludeArch: s390 s390x | |
79 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
80 | ||
81 | # currently lib, not %{_lib} (see cups.spec) | |
82 | %define cupsdir /usr/lib/cups/backend | |
d80dfd39 | 83 | %define udevdir /lib/udev |
8e2aef6c AM |
84 | |
85 | %description | |
86 | Bluetooth utilities: | |
d8eef2ef | 87 | - bluetoothd |
8e2aef6c AM |
88 | - hciattach |
89 | - hciconfig | |
886fa953 JB |
90 | - hcidump |
91 | - hcitool | |
8e2aef6c | 92 | - l2ping |
8e2aef6c | 93 | - start scripts (PLD) |
8e2aef6c AM |
94 | |
95 | The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. | |
96 | ||
97 | %description -l pl.UTF-8 | |
98 | Narzędzia Bluetooth: | |
d8eef2ef | 99 | - bluetoothd |
8e2aef6c AM |
100 | - hciattach |
101 | - hciconfig | |
886fa953 JB |
102 | - hcidump |
103 | - hcitool | |
8e2aef6c | 104 | - l2ping |
8e2aef6c | 105 | - skrypty startowe (PLD) |
8e2aef6c AM |
106 | |
107 | Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA. | |
108 | ||
8e2aef6c AM |
109 | %package -n cups-backend-bluetooth |
110 | Summary: Bluetooth backend for CUPS | |
111 | Summary(pl.UTF-8): Backend Bluetooth dla CUPS-a | |
112 | Group: Applications/Printing | |
42ca9004 | 113 | Requires: %{name}-libs = %{version}-%{release} |
8e2aef6c AM |
114 | Requires: cups |
115 | ||
116 | %description -n cups-backend-bluetooth | |
117 | Bluetooth backend for CUPS. | |
118 | ||
119 | %description -n cups-backend-bluetooth -l pl.UTF-8 | |
120 | Backend Bluetooth dla CUPS-a. | |
121 | ||
42ca9004 JB |
122 | %package -n zsh-completion-bluez |
123 | Summary: Zsh completion for bluez commands | |
124 | Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla poleceń z pakietu bluez | |
125 | Group: Applications/Shells | |
126 | Requires: %{name} = %{version}-%{release} | |
127 | Requires: zsh | |
24cdf5f2 | 128 | BuildArch: noarch |
42ca9004 JB |
129 | |
130 | %description -n zsh-completion-bluez | |
131 | Zsh completion for bluez commands (bluezctl utility). | |
132 | ||
133 | %description -n zsh-completion-bluez -l pl.UTF-8 | |
134 | Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia | |
135 | bluezctl). | |
136 | ||
8e2aef6c AM |
137 | %package libs |
138 | Summary: Bluetooth libraries | |
139 | Summary(pl.UTF-8): Biblioteki Bluetooth | |
ce95dcac | 140 | Group: Libraries |
6f85f406 | 141 | Obsoletes: bluez-sdp < 2 |
8e2aef6c AM |
142 | |
143 | %description libs | |
144 | Libraries for use in Bluetooth applications. | |
145 | ||
146 | The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. | |
147 | ||
148 | %description libs -l pl.UTF-8 | |
149 | Biblioteki do używania w aplikacjach Bluetooth. | |
150 | ||
151 | Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA. | |
152 | ||
153 | %package libs-devel | |
154 | Summary: Header files for Bluetooth applications | |
155 | Summary(pl.UTF-8): Pliki nagłówkowe dla aplikacji Bluetooth | |
156 | Group: Development/Libraries | |
bfe3d974 | 157 | Requires: %{name}-libs = %{version}-%{release} |
6f85f406 | 158 | Obsoletes: bluez-sdp-devel < 2 |
8e2aef6c AM |
159 | |
160 | %description libs-devel | |
161 | bluez-libs-devel contains header files for use in Bluetooth | |
162 | applications. | |
163 | ||
164 | %description libs-devel -l pl.UTF-8 | |
165 | Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach | |
166 | Bluetooth. | |
167 | ||
168 | %package libs-static | |
169 | Summary: Static Bluetooth libraries | |
170 | Summary(pl.UTF-8): Biblioteki statyczne Bluetooth | |
171 | Group: Development/Libraries | |
bfe3d974 | 172 | Requires: %{name}-libs-devel = %{version}-%{release} |
6f85f406 | 173 | Obsoletes: bluez-sdp-static < 2 |
8e2aef6c AM |
174 | |
175 | %description libs-static | |
176 | bluez-libs-static contains development static libraries for use in | |
177 | Bluetooth applications. | |
178 | ||
179 | %description libs-static -l pl.UTF-8 | |
180 | Ten pakiet zawiera biblioteki statyczne, których można używać do | |
181 | aplikacji Bluetooth. | |
182 | ||
183 | %prep | |
184 | %setup -q | |
477801c9 | 185 | %patch0 -p1 |
8e2aef6c | 186 | |
0d05b843 JB |
187 | # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules |
188 | %{__rm} -r ell | |
189 | ||
8e2aef6c AM |
190 | %build |
191 | %{__libtoolize} | |
192 | %{__aclocal} | |
193 | %{__autoconf} | |
194 | %{__autoheader} | |
195 | %{__automake} | |
196 | %configure \ | |
b0a62422 | 197 | --disable-silent-rules \ |
2686afe6 | 198 | --enable-btpclient \ |
42ca9004 | 199 | %{?with_deprecated:--enable-deprecated} \ |
d358118c | 200 | --enable-experimental \ |
42ca9004 | 201 | --enable-external-ell \ |
54e0667c | 202 | --enable-external-plugins \ |
b7b1b136 | 203 | --enable-health \ |
dc831a02 | 204 | --enable-hid2hci \ |
886fa953 | 205 | --enable-library \ |
477801c9 JR |
206 | --enable-tools \ |
207 | --enable-cups \ | |
208 | --enable-testing \ | |
2686afe6 | 209 | --enable-mesh \ |
b7b1b136 JB |
210 | --enable-midi \ |
211 | --enable-nfc \ | |
212 | --enable-sap \ | |
d358118c | 213 | --enable-sixaxis \ |
70dfe498 | 214 | %{__enable_disable static_libs static} \ |
dc831a02 | 215 | --with-udevdir=%{udevdir} \ |
d63e2873 MK |
216 | %{?with_systemd:--with-systemdsystemunitdir=%{systemdunitdir}} \ |
217 | %{?with_systemd:--with-systemduserunitdir=%{systemduserunitdir}} \ | |
218 | %{!?with_systemd:--disable-systemd} | |
8e2aef6c | 219 | |
284a9eb9 | 220 | %{__make} \ |
dc831a02 | 221 | cupsdir=%{cupsdir} |
8e2aef6c AM |
222 | |
223 | %install | |
224 | rm -rf $RPM_BUILD_ROOT | |
f8fe27de | 225 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ |
d358118c | 226 | $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth} |
8e2aef6c AM |
227 | |
228 | %{__make} install \ | |
229 | DESTDIR=$RPM_BUILD_ROOT \ | |
230 | cupsdir=%{cupsdir} \ | |
2b38a1f3 | 231 | rulesdir=%{udevdir}/rules.d \ |
b0a62422 | 232 | udevdir=%{udevdir} |
8e2aef6c | 233 | |
8e2aef6c AM |
234 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth |
235 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth | |
9a71d017 | 236 | |
477801c9 | 237 | #serial port connected Broadcom HCIs scripts |
dc831a02 | 238 | install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d |
d63e2873 | 239 | %{?with_systemd:install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}} |
dc831a02 | 240 | install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth |
477801c9 JR |
241 | |
242 | # Install the HCI emulator, useful for testing | |
dc831a02 | 243 | install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth |
477801c9 | 244 | |
886fa953 | 245 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la |
8e2aef6c AM |
246 | |
247 | %clean | |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
250 | %post | |
251 | /sbin/chkconfig --add bluetooth | |
252 | %service bluetooth restart | |
bfe3d974 | 253 | %systemd_post bluetooth.service |
5f69477c | 254 | %systemd_user_post obex.service |
8e2aef6c AM |
255 | |
256 | %preun | |
257 | if [ "$1" = "0" ]; then | |
258 | %service bluetooth stop | |
259 | /sbin/chkconfig --del bluetooth | |
260 | fi | |
c7fd41e3 | 261 | %systemd_preun bluetooth.service |
5f69477c | 262 | %systemd_user_preun obex.service |
c7fd41e3 | 263 | |
bfe3d974 | 264 | %postun |
ef6d37ba | 265 | %systemd_reload |
c7fd41e3 | 266 | |
d358118c JB |
267 | %triggerpostun -- bluez < 5.13-1 |
268 | %service rfcomm stop | |
269 | /sbin/chkconfig --del rfcomm | |
5f69477c JR |
270 | # bluez < 4.98-3 |
271 | %systemd_trigger bluetooth.service | |
d358118c | 272 | |
bfe3d974 JR |
273 | %post libs -p /sbin/ldconfig |
274 | %postun libs -p /sbin/ldconfig | |
275 | ||
8e2aef6c AM |
276 | %files |
277 | %defattr(644,root,root,755) | |
f7f17420 | 278 | %doc AUTHORS ChangeLog README |
a5b81081 | 279 | %attr(755,root,root) %{_bindir}/bluemoon |
886fa953 | 280 | %attr(755,root,root) %{_bindir}/bluetoothctl |
a9cb60b8 | 281 | %attr(755,root,root) %{_bindir}/btattach |
886fa953 | 282 | %attr(755,root,root) %{_bindir}/btmon |
05f769ed | 283 | %attr(755,root,root) %{_bindir}/hex2hcd |
ad500939 | 284 | %attr(755,root,root) %{_bindir}/isotest |
3aca1cde | 285 | %attr(755,root,root) %{_bindir}/l2ping |
886fa953 | 286 | %attr(755,root,root) %{_bindir}/l2test |
f072e9cd | 287 | %attr(755,root,root) %{_bindir}/mesh-cfgclient |
14465098 | 288 | %attr(755,root,root) %{_bindir}/mesh-cfgtest |
2686afe6 | 289 | %attr(755,root,root) %{_bindir}/meshctl |
e4a249a5 | 290 | %attr(755,root,root) %{_bindir}/mpris-proxy |
886fa953 | 291 | %attr(755,root,root) %{_bindir}/rctest |
b7b1b136 JB |
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 | |
3aca1cde JB |
298 | %attr(755,root,root) %{_bindir}/rfcomm |
299 | %attr(755,root,root) %{_bindir}/sdptool | |
b7b1b136 | 300 | %endif |
2686afe6 | 301 | %if "%{_libexecdir}" != "%{_libdir}" |
749521e9 | 302 | %dir %{_libexecdir}/bluetooth |
2686afe6 | 303 | %endif |
42ca9004 | 304 | %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd |
749521e9 | 305 | %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd |
477801c9 JR |
306 | %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh |
307 | %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt | |
749521e9 | 308 | %attr(755,root,root) %{_libexecdir}/bluetooth/obexd |
8e2aef6c AM |
309 | %dir %{_libdir}/bluetooth |
310 | %dir %{_libdir}/bluetooth/plugins | |
049dc700 | 311 | %dir %{_libdir}/obex |
d358118c | 312 | %dir %{_libdir}/obex/plugins |
8e2aef6c | 313 | %dir %{_sysconfdir}/bluetooth |
886fa953 | 314 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf |
54e0667c JP |
315 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/main.conf |
316 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/mesh-main.conf | |
886fa953 | 317 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf |
8e2aef6c AM |
318 | %attr(754,root,root) /etc/rc.d/init.d/bluetooth |
319 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth | |
d63e2873 | 320 | %if %{with systemd} |
bfe3d974 | 321 | %{systemdunitdir}/bluetooth.service |
42ca9004 | 322 | %{systemdunitdir}/bluetooth-mesh.service |
477801c9 | 323 | %{systemdunitdir}/btattach-bcm@.service |
54e0667c | 324 | %{systemduserunitdir}/dbus-org.bluez.obex.service |
d358118c | 325 | %{systemduserunitdir}/obex.service |
886fa953 | 326 | %{_datadir}/dbus-1/services/org.bluez.obex.service |
d358118c | 327 | %{_datadir}/dbus-1/system-services/org.bluez.service |
42ca9004 | 328 | %{_datadir}/dbus-1/system-services/org.bluez.mesh.service |
4fe0829b JP |
329 | %{_datadir}/dbus-1/system.d/bluetooth.conf |
330 | %{_datadir}/dbus-1/system.d/bluetooth-mesh.conf | |
d63e2873 | 331 | %endif |
9b2d7208 | 332 | %attr(755,root,root) %{udevdir}/hid2hci |
477801c9 | 333 | %{udevdir}/rules.d/69-btattach-bcm.rules |
886fa953 | 334 | %{udevdir}/rules.d/97-hid2hci.rules |
e3027b3f | 335 | %{_mandir}/man1/bluetoothctl.1* |
04aa5cd3 JP |
336 | %{_mandir}/man1/bluetoothctl-admin.1* |
337 | %{_mandir}/man1/bluetoothctl-advertise.1* | |
338 | %{_mandir}/man1/bluetoothctl-endpoint.1* | |
339 | %{_mandir}/man1/bluetoothctl-gatt.1* | |
4fe0829b JP |
340 | %{_mandir}/man1/bluetoothctl-mgmt.1* |
341 | %{_mandir}/man1/bluetoothctl-monitor.1* | |
04aa5cd3 JP |
342 | %{_mandir}/man1/bluetoothctl-player.1* |
343 | %{_mandir}/man1/bluetoothctl-scan.1* | |
344 | %{_mandir}/man1/bluetoothctl-transport.1* | |
a9cb60b8 | 345 | %{_mandir}/man1/btattach.1* |
4fe0829b | 346 | %{_mandir}/man1/btmgmt.1* |
14465098 | 347 | %{_mandir}/man1/btmon.1* |
b7b1b136 | 348 | %{_mandir}/man1/hid2hci.1* |
ad500939 | 349 | %{_mandir}/man1/isotest.1* |
b7b1b136 JB |
350 | %{_mandir}/man1/l2ping.1* |
351 | %{_mandir}/man1/rctest.1* | |
352 | %if %{with deprecated} | |
3aca1cde | 353 | %{_mandir}/man1/ciptool.1* |
886fa953 JB |
354 | %{_mandir}/man1/hciattach.1* |
355 | %{_mandir}/man1/hciconfig.1* | |
356 | %{_mandir}/man1/hcidump.1* | |
3aca1cde | 357 | %{_mandir}/man1/hcitool.1* |
3aca1cde JB |
358 | %{_mandir}/man1/rfcomm.1* |
359 | %{_mandir}/man1/sdptool.1* | |
b7b1b136 | 360 | %endif |
04aa5cd3 | 361 | %{_mandir}/man5/org.bluez.*.5* |
14465098 | 362 | %{_mandir}/man8/bluetooth-meshd.8* |
3aca1cde | 363 | %{_mandir}/man8/bluetoothd.8* |
8e2aef6c AM |
364 | |
365 | %files -n cups-backend-bluetooth | |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth | |
368 | ||
42ca9004 JB |
369 | %files -n zsh-completion-bluez |
370 | %defattr(644,root,root,755) | |
371 | %{zsh_compdir}/_bluetoothctl | |
372 | ||
8e2aef6c AM |
373 | %files libs |
374 | %defattr(644,root,root,755) | |
375 | %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.* | |
3aca1cde | 376 | %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3 |
8e2aef6c AM |
377 | |
378 | %files libs-devel | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_libdir}/libbluetooth.so | |
8e2aef6c | 381 | %{_includedir}/bluetooth |
8e2aef6c AM |
382 | %{_pkgconfigdir}/bluez.pc |
383 | ||
70dfe498 | 384 | %if %{with static_libs} |
8e2aef6c AM |
385 | %files libs-static |
386 | %defattr(644,root,root,755) | |
387 | %{_libdir}/libbluetooth.a | |
70dfe498 | 388 | %endif |