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