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