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