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