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