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