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