- updated to 5.49
[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.49
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:  f210e84db707d66af3b889084a6f8bef
17 Source1:        %{name}.init
18 Source2:        %{name}.sysconfig
19 URL:            http://www.bluez.org/
20 BuildRequires:  alsa-lib-devel >= 1.0
21 BuildRequires:  autoconf >= 2.60
22 BuildRequires:  automake
23 BuildRequires:  check-devel >= 0.9.6
24 BuildRequires:  dbus-devel >= 1.6
25 BuildRequires:  glib2-devel >= 1:2.28
26 BuildRequires:  libical-devel
27 BuildRequires:  libtool
28 BuildRequires:  pkgconfig >= 1:0.9.0
29 BuildRequires:  readline-devel
30 BuildRequires:  rpmbuild(macros) >= 1.682
31 BuildRequires:  tar >= 1:1.22
32 BuildRequires:  udev-devel >= 1:172
33 BuildRequires:  xz
34 Requires:       %{name}-libs = %{version}-%{release}
35 Requires:       dbus-libs >= 1.6
36 Requires:       glib2 >= 1:2.28
37 Requires:       hwdata >= 0.225
38 Requires:       rc-scripts
39 Requires:       udev >= 1:172
40 Provides:       bluez-hcidump = %{version}
41 Provides:       bluez-utils = %{version}-%{release}
42 Provides:       obexd = %{version}
43 Provides:       dbus(org.openobex.client)
44 Provides:       obex-data-server = %{version}
45 # moved somewhere or dropped?
46 #Obsoletes:     alsa-plugins-bluetooth
47 Obsoletes:      bluez-hcidump
48 Obsoletes:      bluez-hciemu
49 Obsoletes:      bluez-pan
50 Obsoletes:      bluez-sdp
51 Obsoletes:      bluez-utils
52 Obsoletes:      bluez-utils-init
53 Obsoletes:      obexd
54 Obsoletes:      obex-data-server
55 # moved somewhere or dropped?
56 #Obsoletes:     gstreamer-bluetooth < 4.101-3
57 #Obsoletes:     gstreamer0.10-bluetooth < 5
58 Conflicts:      bluez-bluefw
59 ExcludeArch:    s390 s390x
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 # currently lib, not %{_lib} (see cups.spec)
63 %define         cupsdir         /usr/lib/cups/backend
64 %define         udevdir         /lib/udev
65
66 %description
67 Bluetooth utilities:
68  - bluetoothd
69  - hciattach
70  - hciconfig
71  - hcidump
72  - hcitool
73  - l2ping
74  - start scripts (PLD)
75
76 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
77
78 %description -l pl.UTF-8
79 Narzędzia Bluetooth:
80  - bluetoothd
81  - hciattach
82  - hciconfig
83  - hcidump
84  - hcitool
85  - l2ping
86  - skrypty startowe (PLD)
87
88 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
89
90 %package -n cups-backend-bluetooth
91 Summary:        Bluetooth backend for CUPS
92 Summary(pl.UTF-8):      Backend Bluetooth dla CUPS-a
93 Group:          Applications/Printing
94 Requires:       bluez-libs >= %{version}-%{release}
95 Requires:       cups
96
97 %description -n cups-backend-bluetooth
98 Bluetooth backend for CUPS.
99
100 %description -n cups-backend-bluetooth -l pl.UTF-8
101 Backend Bluetooth dla CUPS-a.
102
103 %package libs
104 Summary:        Bluetooth libraries
105 Summary(pl.UTF-8):      Biblioteki Bluetooth
106 Group:          Libraries
107 Obsoletes:      bluez-sdp
108
109 %description libs
110 Libraries for use in Bluetooth applications.
111
112 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
113
114 %description libs -l pl.UTF-8
115 Biblioteki do używania w aplikacjach Bluetooth.
116
117 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
118
119 %package libs-devel
120 Summary:        Header files for Bluetooth applications
121 Summary(pl.UTF-8):      Pliki nagłówkowe dla aplikacji Bluetooth
122 Group:          Development/Libraries
123 Requires:       %{name}-libs = %{version}-%{release}
124 Obsoletes:      bluez-sdp-devel
125
126 %description libs-devel
127 bluez-libs-devel contains header files for use in Bluetooth
128 applications.
129
130 %description libs-devel -l pl.UTF-8
131 Ten pakiet zawiera pliki nagłówkowe do używania w aplikacjach
132 Bluetooth.
133
134 %package libs-static
135 Summary:        Static Bluetooth libraries
136 Summary(pl.UTF-8):      Biblioteki statyczne Bluetooth
137 Group:          Development/Libraries
138 Requires:       %{name}-libs-devel = %{version}-%{release}
139 Obsoletes:      bluez-sdp-static
140
141 %description libs-static
142 bluez-libs-static contains development static libraries for use in
143 Bluetooth applications.
144
145 %description libs-static -l pl.UTF-8
146 Ten pakiet zawiera biblioteki statyczne, których można używać do
147 aplikacji Bluetooth.
148
149 %prep
150 %setup -q
151
152 %build
153 %{__libtoolize}
154 %{__aclocal}
155 %{__autoconf}
156 %{__autoheader}
157 %{__automake}
158 %configure \
159         --disable-silent-rules \
160         %{?with_deprecated:--enable-deprecated} \
161         --enable-experimental \
162         --enable-health \
163         --enable-library \
164         --enable-midi \
165         --enable-nfc \
166         --enable-sap \
167         --enable-sixaxis \
168         --enable-static \
169         --disable-systemd
170
171 %{__make} \
172         cupsdir=%{cupsdir} \
173         rulesdir=%{udevdir}/rules.d \
174         udevdir=%{udevdir}
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
179         $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
180
181 %{__make} install \
182         DESTDIR=$RPM_BUILD_ROOT \
183         cupsdir=%{cupsdir} \
184         rulesdir=%{udevdir}/rules.d \
185         udevdir=%{udevdir}
186
187 %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
188
189 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
190 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
191
192 install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
193 install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
194
195 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post
201 /sbin/chkconfig --add bluetooth
202 %service bluetooth restart
203
204 %preun
205 if [ "$1" = "0" ]; then
206         %service bluetooth stop
207         /sbin/chkconfig --del bluetooth
208 fi
209
210 %triggerpostun -- bluez < 5.13-1
211 %service rfcomm stop
212 /sbin/chkconfig --del rfcomm
213
214 %post   libs -p /sbin/ldconfig
215 %postun libs -p /sbin/ldconfig
216
217 %files
218 %defattr(644,root,root,755)
219 %doc AUTHORS ChangeLog README
220 %attr(755,root,root) %{_bindir}/bccmd
221 %attr(755,root,root) %{_bindir}/bluemoon
222 %attr(755,root,root) %{_bindir}/bluetoothctl
223 %attr(755,root,root) %{_bindir}/btattach
224 %attr(755,root,root) %{_bindir}/btmon
225 %attr(755,root,root) %{_bindir}/hex2hcd
226 %attr(755,root,root) %{_bindir}/l2ping
227 %attr(755,root,root) %{_bindir}/l2test
228 %attr(755,root,root) %{_bindir}/mpris-proxy
229 %attr(755,root,root) %{_bindir}/rctest
230 %if %{with deprecated}
231 %attr(755,root,root) %{_bindir}/ciptool
232 %attr(755,root,root) %{_bindir}/hciattach
233 %attr(755,root,root) %{_bindir}/hciconfig
234 %attr(755,root,root) %{_bindir}/hcidump
235 %attr(755,root,root) %{_bindir}/hcitool
236 %attr(755,root,root) %{_bindir}/rfcomm
237 %attr(755,root,root) %{_bindir}/sdptool
238 %endif
239 %dir %{_libdir}/bluetooth
240 %attr(755,root,root) %{_libdir}/bluetooth/bluetoothd
241 %attr(755,root,root) %{_libdir}/bluetooth/obexd
242 %dir %{_libdir}/bluetooth/plugins
243 %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
244 %dir %{_libdir}/obex
245 %dir %{_libdir}/obex/plugins
246 %dir %{_sysconfdir}/bluetooth
247 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
248 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
249 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
251 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
252 %attr(755,root,root) %{udevdir}/hid2hci
253 %{udevdir}/rules.d/97-hid2hci.rules
254 %{_mandir}/man1/bccmd.1*
255 %{_mandir}/man1/btattach.1*
256 %{_mandir}/man1/hid2hci.1*
257 %{_mandir}/man1/l2ping.1*
258 %{_mandir}/man1/rctest.1*
259 %if %{with deprecated}
260 %{_mandir}/man1/ciptool.1*
261 %{_mandir}/man1/hciattach.1*
262 %{_mandir}/man1/hciconfig.1*
263 %{_mandir}/man1/hcidump.1*
264 %{_mandir}/man1/hcitool.1*
265 %{_mandir}/man1/rfcomm.1*
266 %{_mandir}/man1/sdptool.1*
267 %endif
268 %{_mandir}/man8/bluetoothd.8*
269
270 %files -n cups-backend-bluetooth
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
273
274 %files libs
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.*
277 %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3
278
279 %files libs-devel
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_libdir}/libbluetooth.so
282 %{_includedir}/bluetooth
283 %{_pkgconfigdir}/bluez.pc
284
285 %files libs-static
286 %defattr(644,root,root,755)
287 %{_libdir}/libbluetooth.a