]> git.pld-linux.org Git - packages/bluez.git/blob - bluez.spec
noarch zsh completion
[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.68
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:  00a72fed12e706b2d8bb40786154d3aa
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:  rpm-build >= 4.6
41 BuildRequires:  rpmbuild(macros) >= 2.011
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 >= 1:250.1
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 >= 1:250.1
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 < 3
64 Obsoletes:      bluez-hciemu < 2
65 Obsoletes:      bluez-pan < 2
66 Obsoletes:      bluez-sdp < 2
67 Obsoletes:      bluez-systemd < 4.98-3
68 Obsoletes:      bluez-utils < 4
69 Obsoletes:      bluez-utils-init < 4
70 Obsoletes:      obexd < 1
71 Obsoletes:      obex-data-server < 1
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 BuildArch:      noarch
127
128 %description -n zsh-completion-bluez
129 Zsh completion for bluez commands (bluezctl utility).
130
131 %description -n zsh-completion-bluez -l pl.UTF-8
132 Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
133 bluezctl).
134
135 %package libs
136 Summary:        Bluetooth libraries
137 Summary(pl.UTF-8):      Biblioteki Bluetooth
138 Group:          Libraries
139 Obsoletes:      bluez-sdp < 2
140
141 %description libs
142 Libraries for use in Bluetooth applications.
143
144 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
145
146 %description libs -l pl.UTF-8
147 Biblioteki do używania w aplikacjach Bluetooth.
148
149 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
150
151 %package libs-devel
152 Summary:        Header files for Bluetooth applications
153 Summary(pl.UTF-8):      Pliki nagłówkowe dla aplikacji Bluetooth
154 Group:          Development/Libraries
155 Requires:       %{name}-libs = %{version}-%{release}
156 Obsoletes:      bluez-sdp-devel < 2
157
158 %description libs-devel
159 bluez-libs-devel contains header files for use in Bluetooth
160 applications.
161
162 %description libs-devel -l pl.UTF-8
163 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
164 Bluetooth.
165
166 %package libs-static
167 Summary:        Static Bluetooth libraries
168 Summary(pl.UTF-8):      Biblioteki statyczne Bluetooth
169 Group:          Development/Libraries
170 Requires:       %{name}-libs-devel = %{version}-%{release}
171 Obsoletes:      bluez-sdp-static < 2
172
173 %description libs-static
174 bluez-libs-static contains development static libraries for use in
175 Bluetooth applications.
176
177 %description libs-static -l pl.UTF-8
178 Ten pakiet zawiera biblioteki statyczne, których można używać do
179 aplikacji Bluetooth.
180
181 %prep
182 %setup -q
183 %patch0 -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 %systemd_user_post obex.service
255
256 %preun
257 if [ "$1" = "0" ]; then
258         %service bluetooth stop
259         /sbin/chkconfig --del bluetooth
260 fi
261 %systemd_preun bluetooth.service
262 %systemd_user_preun obex.service
263
264 %postun
265 %systemd_reload
266
267 %triggerpostun -- bluez < 5.13-1
268 %service rfcomm stop
269 /sbin/chkconfig --del rfcomm
270 # bluez < 4.98-3
271 %systemd_trigger bluetooth.service
272
273 %post   libs -p /sbin/ldconfig
274 %postun libs -p /sbin/ldconfig
275
276 %files
277 %defattr(644,root,root,755)
278 %doc AUTHORS ChangeLog README
279 %attr(755,root,root) %{_bindir}/bluemoon
280 %attr(755,root,root) %{_bindir}/bluetoothctl
281 %attr(755,root,root) %{_bindir}/btattach
282 %attr(755,root,root) %{_bindir}/btmon
283 %attr(755,root,root) %{_bindir}/hex2hcd
284 %attr(755,root,root) %{_bindir}/isotest
285 %attr(755,root,root) %{_bindir}/l2ping
286 %attr(755,root,root) %{_bindir}/l2test
287 %attr(755,root,root) %{_bindir}/mesh-cfgclient
288 %attr(755,root,root) %{_bindir}/mesh-cfgtest
289 %attr(755,root,root) %{_bindir}/meshctl
290 %attr(755,root,root) %{_bindir}/mpris-proxy
291 %attr(755,root,root) %{_bindir}/rctest
292 %if %{with deprecated}
293 %attr(755,root,root) %{_bindir}/ciptool
294 %attr(755,root,root) %{_bindir}/hciattach
295 %attr(755,root,root) %{_bindir}/hciconfig
296 %attr(755,root,root) %{_bindir}/hcidump
297 %attr(755,root,root) %{_bindir}/hcitool
298 %attr(755,root,root) %{_bindir}/rfcomm
299 %attr(755,root,root) %{_bindir}/sdptool
300 %endif
301 %if "%{_libexecdir}" != "%{_libdir}"
302 %dir %{_libexecdir}/bluetooth
303 %endif
304 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
305 %attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
306 %attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
307 %attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
308 %attr(755,root,root) %{_libexecdir}/bluetooth/obexd
309 %dir %{_libdir}/bluetooth
310 %dir %{_libdir}/bluetooth/plugins
311 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
312 %dir %{_libdir}/obex
313 %dir %{_libdir}/obex/plugins
314 %dir %{_sysconfdir}/bluetooth
315 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
316 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
317 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
318 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
319 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
320 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
321 %{systemdunitdir}/bluetooth.service
322 %{systemdunitdir}/bluetooth-mesh.service
323 %{systemdunitdir}/btattach-bcm@.service
324 %{systemduserunitdir}/obex.service
325 %{_datadir}/dbus-1/services/org.bluez.obex.service
326 %{_datadir}/dbus-1/system-services/org.bluez.service
327 %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
328 %attr(755,root,root) %{udevdir}/hid2hci
329 %{udevdir}/rules.d/69-btattach-bcm.rules
330 %{udevdir}/rules.d/97-hid2hci.rules
331 %{_mandir}/man1/btattach.1*
332 %{_mandir}/man1/btmon.1*
333 %{_mandir}/man1/hid2hci.1*
334 %{_mandir}/man1/isotest.1*
335 %{_mandir}/man1/l2ping.1*
336 %{_mandir}/man1/rctest.1*
337 %if %{with deprecated}
338 %{_mandir}/man1/ciptool.1*
339 %{_mandir}/man1/hciattach.1*
340 %{_mandir}/man1/hciconfig.1*
341 %{_mandir}/man1/hcidump.1*
342 %{_mandir}/man1/hcitool.1*
343 %{_mandir}/man1/rfcomm.1*
344 %{_mandir}/man1/sdptool.1*
345 %endif
346 %{_mandir}/man8/bluetooth-meshd.8*
347 %{_mandir}/man8/bluetoothd.8*
348
349 %files -n cups-backend-bluetooth
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
352
353 %files -n zsh-completion-bluez
354 %defattr(644,root,root,755)
355 %{zsh_compdir}/_bluetoothctl
356
357 %files libs
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
360 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
361
362 %files libs-devel
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/libbluetooth.so
365 %{_includedir}/bluetooth
366 %{_pkgconfigdir}/bluez.pc
367
368 %files libs-static
369 %defattr(644,root,root,755)
370 %{_libdir}/libbluetooth.a
This page took 0.10061 seconds and 3 git commands to generate.