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