]>
Commit | Line | Data |
---|---|---|
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 |
8 | Summary: Bluetooth utilities |
9 | Summary(pl.UTF-8): Narzędzia Bluetooth | |
10 | Name: bluez | |
9b7ce951 | 11 | Version: 5.47 |
8aa97653 | 12 | Release: 1 |
8e2aef6c AM |
13 | License: GPL v2+ |
14 | Group: Applications/System | |
6feb4e6d | 15 | Source0: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz |
9b7ce951 | 16 | # Source0-md5: 783e15f65e70cdb8f721c659e140dd56 |
8e2aef6c AM |
17 | Source1: %{name}.init |
18 | Source2: %{name}.sysconfig | |
8e2aef6c | 19 | URL: http://www.bluez.org/ |
b7b1b136 | 20 | BuildRequires: alsa-lib-devel >= 1.0 |
b0a62422 | 21 | BuildRequires: autoconf >= 2.60 |
8e2aef6c | 22 | BuildRequires: automake |
f288002d | 23 | BuildRequires: check-devel >= 0.9.6 |
a5b81081 | 24 | BuildRequires: dbus-devel >= 1.6 |
0ff69826 | 25 | BuildRequires: glib2-devel >= 1:2.28 |
886fa953 | 26 | BuildRequires: libical-devel |
8e2aef6c | 27 | BuildRequires: libtool |
8e2aef6c | 28 | BuildRequires: pkgconfig >= 1:0.9.0 |
9980fdad | 29 | BuildRequires: readline-devel |
d358118c | 30 | BuildRequires: rpmbuild(macros) >= 1.682 |
886fa953 | 31 | BuildRequires: tar >= 1:1.22 |
e4a249a5 | 32 | BuildRequires: udev-devel >= 1:172 |
886fa953 | 33 | BuildRequires: xz |
e01e2ec1 | 34 | Requires(post,preun,postun): systemd-units >= 38 |
bfe3d974 | 35 | Requires: %{name}-libs = %{version}-%{release} |
a5b81081 | 36 | Requires: dbus-libs >= 1.6 |
0ff69826 | 37 | Requires: glib2 >= 1:2.28 |
0416a3b3 | 38 | Requires: hwdata >= 0.225 |
9b3fd779 | 39 | Requires: rc-scripts |
e01e2ec1 | 40 | Requires: systemd-units >= 38 |
e4a249a5 | 41 | Requires: udev >= 1:172 |
886fa953 | 42 | Provides: bluez-hcidump = %{version} |
bfe3d974 | 43 | Provides: bluez-utils = %{version}-%{release} |
886fa953 | 44 | Provides: obexd = %{version} |
c8deab5a JR |
45 | Provides: dbus(org.openobex.client) |
46 | Provides: obex-data-server = %{version} | |
886fa953 JB |
47 | # moved somewhere or dropped? |
48 | #Obsoletes: alsa-plugins-bluetooth | |
49 | Obsoletes: bluez-hcidump | |
8e2aef6c AM |
50 | Obsoletes: bluez-hciemu |
51 | Obsoletes: bluez-pan | |
52 | Obsoletes: bluez-sdp | |
6acdd90b | 53 | Obsoletes: bluez-systemd |
5e8dfcdf | 54 | Obsoletes: bluez-utils |
8e2aef6c | 55 | Obsoletes: bluez-utils-init |
886fa953 | 56 | Obsoletes: obexd |
c8deab5a | 57 | Obsoletes: obex-data-server |
886fa953 JB |
58 | # moved somewhere or dropped? |
59 | #Obsoletes: gstreamer-bluetooth < 4.101-3 | |
60 | #Obsoletes: gstreamer0.10-bluetooth < 5 | |
8e2aef6c AM |
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 | |
d80dfd39 | 67 | %define udevdir /lib/udev |
8e2aef6c AM |
68 | |
69 | %description | |
70 | Bluetooth utilities: | |
d8eef2ef | 71 | - bluetoothd |
8e2aef6c AM |
72 | - hciattach |
73 | - hciconfig | |
886fa953 JB |
74 | - hcidump |
75 | - hcitool | |
8e2aef6c | 76 | - l2ping |
8e2aef6c | 77 | - start scripts (PLD) |
8e2aef6c AM |
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: | |
d8eef2ef | 83 | - bluetoothd |
8e2aef6c AM |
84 | - hciattach |
85 | - hciconfig | |
886fa953 JB |
86 | - hcidump |
87 | - hcitool | |
8e2aef6c | 88 | - l2ping |
8e2aef6c | 89 | - skrypty startowe (PLD) |
8e2aef6c AM |
90 | |
91 | Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA. | |
92 | ||
8e2aef6c AM |
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 | |
bfe3d974 | 97 | Requires: bluez-libs >= %{version}-%{release} |
8e2aef6c AM |
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 | ||
8e2aef6c AM |
106 | %package libs |
107 | Summary: Bluetooth libraries | |
108 | Summary(pl.UTF-8): Biblioteki Bluetooth | |
ce95dcac | 109 | Group: Libraries |
8e2aef6c AM |
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 | |
bfe3d974 | 126 | Requires: %{name}-libs = %{version}-%{release} |
8e2aef6c AM |
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 | |
bfe3d974 | 141 | Requires: %{name}-libs-devel = %{version}-%{release} |
8e2aef6c AM |
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 | |
8e2aef6c AM |
154 | |
155 | %build | |
156 | %{__libtoolize} | |
157 | %{__aclocal} | |
158 | %{__autoconf} | |
159 | %{__autoheader} | |
160 | %{__automake} | |
161 | %configure \ | |
b0a62422 | 162 | --disable-silent-rules \ |
b7b1b136 | 163 | %{?with_deprecated:--enable-deprecated} \ |
d358118c | 164 | --enable-experimental \ |
b7b1b136 | 165 | --enable-health \ |
886fa953 | 166 | --enable-library \ |
b7b1b136 JB |
167 | --enable-midi \ |
168 | --enable-nfc \ | |
169 | --enable-sap \ | |
d358118c JB |
170 | --enable-sixaxis \ |
171 | --enable-static \ | |
172 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
173 | --with-systemduserunitdir=%{systemduserunitdir} | |
8e2aef6c | 174 | |
284a9eb9 | 175 | %{__make} \ |
8e2aef6c | 176 | cupsdir=%{cupsdir} \ |
2b38a1f3 | 177 | rulesdir=%{udevdir}/rules.d \ |
b0a62422 | 178 | udevdir=%{udevdir} |
8e2aef6c AM |
179 | |
180 | %install | |
181 | rm -rf $RPM_BUILD_ROOT | |
f8fe27de | 182 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ |
d358118c | 183 | $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth} |
8e2aef6c AM |
184 | |
185 | %{__make} install \ | |
186 | DESTDIR=$RPM_BUILD_ROOT \ | |
187 | cupsdir=%{cupsdir} \ | |
2b38a1f3 | 188 | rulesdir=%{udevdir}/rules.d \ |
b0a62422 | 189 | udevdir=%{udevdir} |
8e2aef6c | 190 | |
d358118c JB |
191 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a} |
192 | ||
8e2aef6c AM |
193 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth |
194 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth | |
9a71d017 | 195 | |
886fa953 JB |
196 | install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth |
197 | install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth | |
16869a45 | 198 | |
886fa953 | 199 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la |
8e2aef6c AM |
200 | |
201 | %clean | |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
204 | %post | |
205 | /sbin/chkconfig --add bluetooth | |
206 | %service bluetooth restart | |
bfe3d974 | 207 | %systemd_post bluetooth.service |
8e2aef6c AM |
208 | |
209 | %preun | |
210 | if [ "$1" = "0" ]; then | |
211 | %service bluetooth stop | |
212 | /sbin/chkconfig --del bluetooth | |
213 | fi | |
c7fd41e3 BZ |
214 | %systemd_preun bluetooth.service |
215 | ||
bfe3d974 | 216 | %postun |
ef6d37ba | 217 | %systemd_reload |
c7fd41e3 | 218 | |
bfe3d974 JR |
219 | %triggerpostun -- bluez < 4.98-3 |
220 | %systemd_trigger bluetooth.service | |
221 | ||
d358118c JB |
222 | %triggerpostun -- bluez < 5.13-1 |
223 | %service rfcomm stop | |
224 | /sbin/chkconfig --del rfcomm | |
225 | ||
bfe3d974 JR |
226 | %post libs -p /sbin/ldconfig |
227 | %postun libs -p /sbin/ldconfig | |
228 | ||
8e2aef6c AM |
229 | %files |
230 | %defattr(644,root,root,755) | |
f7f17420 | 231 | %doc AUTHORS ChangeLog README |
886fa953 | 232 | %attr(755,root,root) %{_bindir}/bccmd |
a5b81081 | 233 | %attr(755,root,root) %{_bindir}/bluemoon |
886fa953 | 234 | %attr(755,root,root) %{_bindir}/bluetoothctl |
a9cb60b8 | 235 | %attr(755,root,root) %{_bindir}/btattach |
886fa953 | 236 | %attr(755,root,root) %{_bindir}/btmon |
05f769ed | 237 | %attr(755,root,root) %{_bindir}/hex2hcd |
3aca1cde | 238 | %attr(755,root,root) %{_bindir}/l2ping |
886fa953 | 239 | %attr(755,root,root) %{_bindir}/l2test |
e4a249a5 | 240 | %attr(755,root,root) %{_bindir}/mpris-proxy |
886fa953 | 241 | %attr(755,root,root) %{_bindir}/rctest |
b7b1b136 JB |
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 | |
3aca1cde JB |
248 | %attr(755,root,root) %{_bindir}/rfcomm |
249 | %attr(755,root,root) %{_bindir}/sdptool | |
b7b1b136 | 250 | %endif |
8e2aef6c | 251 | %dir %{_libdir}/bluetooth |
886fa953 JB |
252 | %attr(755,root,root) %{_libdir}/bluetooth/bluetoothd |
253 | %attr(755,root,root) %{_libdir}/bluetooth/obexd | |
8e2aef6c | 254 | %dir %{_libdir}/bluetooth/plugins |
d358118c | 255 | %attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so |
049dc700 | 256 | %dir %{_libdir}/obex |
d358118c | 257 | %dir %{_libdir}/obex/plugins |
8e2aef6c | 258 | %dir %{_sysconfdir}/bluetooth |
886fa953 JB |
259 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf |
260 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf | |
8e2aef6c AM |
261 | %attr(754,root,root) /etc/rc.d/init.d/bluetooth |
262 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth | |
263 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf | |
bfe3d974 | 264 | %{systemdunitdir}/bluetooth.service |
d358118c | 265 | %{systemduserunitdir}/obex.service |
886fa953 | 266 | %{_datadir}/dbus-1/services/org.bluez.obex.service |
d358118c | 267 | %{_datadir}/dbus-1/system-services/org.bluez.service |
9b2d7208 | 268 | %attr(755,root,root) %{udevdir}/hid2hci |
886fa953 JB |
269 | %{udevdir}/rules.d/97-hid2hci.rules |
270 | %{_mandir}/man1/bccmd.1* | |
a9cb60b8 | 271 | %{_mandir}/man1/btattach.1* |
b7b1b136 JB |
272 | %{_mandir}/man1/hid2hci.1* |
273 | %{_mandir}/man1/l2ping.1* | |
274 | %{_mandir}/man1/rctest.1* | |
275 | %if %{with deprecated} | |
3aca1cde | 276 | %{_mandir}/man1/ciptool.1* |
886fa953 JB |
277 | %{_mandir}/man1/hciattach.1* |
278 | %{_mandir}/man1/hciconfig.1* | |
279 | %{_mandir}/man1/hcidump.1* | |
3aca1cde | 280 | %{_mandir}/man1/hcitool.1* |
3aca1cde JB |
281 | %{_mandir}/man1/rfcomm.1* |
282 | %{_mandir}/man1/sdptool.1* | |
b7b1b136 | 283 | %endif |
3aca1cde | 284 | %{_mandir}/man8/bluetoothd.8* |
8e2aef6c AM |
285 | |
286 | %files -n cups-backend-bluetooth | |
287 | %defattr(644,root,root,755) | |
288 | %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth | |
289 | ||
8e2aef6c AM |
290 | %files libs |
291 | %defattr(644,root,root,755) | |
292 | %attr(755,root,root) %{_libdir}/libbluetooth.so.*.*.* | |
3aca1cde | 293 | %attr(755,root,root) %ghost %{_libdir}/libbluetooth.so.3 |
8e2aef6c AM |
294 | |
295 | %files libs-devel | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_libdir}/libbluetooth.so | |
8e2aef6c | 298 | %{_includedir}/bluetooth |
8e2aef6c AM |
299 | %{_pkgconfigdir}/bluez.pc |
300 | ||
301 | %files libs-static | |
302 | %defattr(644,root,root,755) | |
303 | %{_libdir}/libbluetooth.a |