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