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