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