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