]>
Commit | Line | Data |
---|---|---|
62e09e7e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without gtk2 # GTK+ 2 interfaces | |
4 | %bcond_without gtk3 # GTK+ 3 interfaces | |
5 | %bcond_without smartcard # Smartcard support | |
6 | %bcond_without usbredir # USB redirection | |
6cda7c5a | 7 | %bcond_without static_libs # static libraries |
62e09e7e | 8 | # |
887be46e JB |
9 | Summary: A GTK+ client and libraries for SPICE remote desktop servers |
10 | Summary(pl.UTF-8): Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE | |
11 | Name: spice-gtk | |
6cda7c5a | 12 | Version: 0.27 |
81684036 | 13 | Release: 1 |
887be46e JB |
14 | License: LGPL v2.1+ |
15 | Group: X11/Applications | |
7471ac15 | 16 | Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}.tar.bz2 |
6cda7c5a | 17 | # Source0-md5: 722105732b37bbcd04c4051ff44c2fdd |
0d3aaeec JB |
18 | Patch0: %{name}-builddir.patch |
19 | Patch1: %{name}-am.patch | |
887be46e JB |
20 | URL: http://spice-space.org/ |
21 | BuildRequires: autoconf >= 2.57 | |
62e09e7e | 22 | BuildRequires: automake >= 1.6 |
887be46e JB |
23 | BuildRequires: cairo-devel >= 1.2.0 |
24 | BuildRequires: celt051-devel >= 0.5.1.1 | |
25 | BuildRequires: cyrus-sasl-devel >= 2.0 | |
2715df15 | 26 | BuildRequires: gcc >= 5:3.0 |
dbdf4160 | 27 | BuildRequires: gettext-tools >= 0.17 |
887be46e | 28 | BuildRequires: gobject-introspection-devel >= 0.9.4 |
8cdeb0fc | 29 | BuildRequires: glib2-devel >= 1:2.28 |
887be46e | 30 | BuildRequires: gtk-doc >= 1.14 |
35affeb9 | 31 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0} |
62e09e7e | 32 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0} |
887be46e | 33 | BuildRequires: intltool >= 0.40.0 |
62e09e7e | 34 | %{?with_smartcard:BuildRequires: libcacard-devel >= 0.1.2} |
887be46e JB |
35 | BuildRequires: libjpeg-devel |
36 | BuildRequires: libstdc++-devel | |
37 | BuildRequires: libtool >= 2:2.0 | |
6cda7c5a | 38 | BuildRequires: lz4-devel |
887be46e | 39 | BuildRequires: openssl-devel |
8cdeb0fc | 40 | BuildRequires: opus-devel >= 0.9.14 |
887be46e JB |
41 | BuildRequires: perl-Text-CSV |
42 | BuildRequires: perl-base >= 1:5.8.1 | |
c5db4fdc | 43 | BuildRequires: phodav-devel < 2 |
887be46e JB |
44 | BuildRequires: pixman-devel >= 0.17.7 |
45 | BuildRequires: pkgconfig | |
46 | BuildRequires: pulseaudio-devel | |
35affeb9 | 47 | BuildRequires: sed >= 4.0 |
61cee34f | 48 | BuildRequires: spice-protocol >= 0.10.1 |
62e09e7e | 49 | BuildRequires: xorg-lib-libX11-devel |
887be46e JB |
50 | BuildRequires: xorg-lib-libXrandr-devel |
51 | BuildRequires: zlib-devel | |
62e09e7e JB |
52 | %if %{with gtk2} |
53 | BuildRequires: gtk+2-devel >= 2:2.18.0 | |
54 | BuildRequires: python-devel >= 2.0 | |
55 | BuildRequires: python-pygtk-devel >= 2:2.0.0 | |
56 | %endif | |
57 | %if %{with usbredir} | |
58 | BuildRequires: acl-devel | |
178a4f62 | 59 | BuildRequires: libusb-devel >= 1.0.16 |
61cee34f | 60 | BuildRequires: polkit-devel >= 0.96 |
f09efb9b | 61 | BuildRequires: usbredir-devel >= 0.5.2 |
62e09e7e JB |
62 | %endif |
63 | %{?with_smartcard:Requires: libcacard >= 0.1.2} | |
12078fdb | 64 | Requires: spice-glib = %{version}-%{release} |
887be46e JB |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
67 | %description | |
68 | A GTK+ client and libraries for SPICE remote desktop servers. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE. | |
72 | ||
73 | %package devel | |
12078fdb JB |
74 | Summary: Header files for SPICE GTK 3.0 client library |
75 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0 | |
76 | Group: X11/Development/Libraries | |
f4803be1 | 77 | Requires: %{name} = %{version}-%{release} |
12078fdb JB |
78 | Requires: spice-glib-devel = %{version}-%{release} |
79 | Requires: gtk+3-devel >= 3.0 | |
887be46e JB |
80 | |
81 | %description devel | |
12078fdb | 82 | Header files for SPICE GTK 3.0 client library. |
887be46e JB |
83 | |
84 | %description devel -l pl.UTF-8 | |
12078fdb | 85 | Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0. |
887be46e JB |
86 | |
87 | %package static | |
12078fdb JB |
88 | Summary: Static SPICE GTK 3.0 client library |
89 | Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 3.0 | |
90 | Group: X11/Development/Libraries | |
887be46e JB |
91 | Requires: %{name}-devel = %{version}-%{release} |
92 | ||
93 | %description static | |
12078fdb | 94 | Static SPICE GTK 3.0 client library. |
887be46e JB |
95 | |
96 | %description static -l pl.UTF-8 | |
12078fdb | 97 | Statyczna biblioteka kliencka SPICE GTK 3.0. |
887be46e JB |
98 | |
99 | %package apidocs | |
100 | Summary: SPICE GTK API documentation | |
12078fdb | 101 | Summary(pl.UTF-8): Dokumentacja API bibliotek SPICE GTK |
887be46e JB |
102 | Group: Documentation |
103 | ||
104 | %description apidocs | |
12078fdb | 105 | API documentation for SPICE GTK libraries. |
887be46e JB |
106 | |
107 | %description apidocs -l pl.UTF-8 | |
12078fdb JB |
108 | Dokumentacja API bibliotek SPICE GTK. |
109 | ||
110 | %package -n spice-glib | |
111 | Summary: SPICE Client GLib library | |
112 | Summary(pl.UTF-8): Biblioteka kliencka SPICE GLib | |
113 | Group: Libraries | |
114 | Requires: celt051 >= 0.5.1.1 | |
8cdeb0fc | 115 | Requires: glib2 >= 1:2.28 |
62e09e7e | 116 | %{?with_smartcard:Requires: libcacard >= 0.1.2} |
8cdeb0fc | 117 | Requires: opus >= 0.9.14 |
12078fdb | 118 | Requires: pixman >= 0.17.7 |
62e09e7e | 119 | %if %{with usbredir} |
178a4f62 | 120 | Requires: libusb >= 1.0.16 |
f09efb9b | 121 | Requires: usbredir >= 0.5.2 |
62e09e7e | 122 | %endif |
12078fdb JB |
123 | |
124 | %description -n spice-glib | |
125 | SPICE Client GLib library. | |
126 | ||
127 | %description -n spice-glib -l pl.UTF-8 | |
128 | Biblioteka kliencka SPICE GLib. | |
129 | ||
130 | %package -n spice-glib-devel | |
131 | Summary: Header files for SPICE Client GLib library | |
132 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GLib | |
133 | Group: Development/Libraries | |
134 | Requires: celt051-devel >= 0.5.1.1 | |
62e09e7e | 135 | Requires: cyrus-sasl-devel >= 2.0 |
8cdeb0fc | 136 | Requires: glib2-devel >= 1:2.28 |
62e09e7e JB |
137 | %{?with_smartcard:Requires: libcacard-devel >= 0.1.2} |
138 | Requires: libjpeg-devel | |
12078fdb JB |
139 | Requires: openssl-devel |
140 | Requires: pixman-devel >= 0.17.7 | |
62e09e7e | 141 | Requires: pulseaudio-devel |
12078fdb | 142 | Requires: spice-glib = %{version}-%{release} |
61cee34f | 143 | Requires: spice-protocol >= 0.10.1 |
62e09e7e | 144 | %if %{with usbredir} |
178a4f62 | 145 | Requires: libusb-devel >= 1.0.16 |
f09efb9b | 146 | Requires: usbredir-devel >= 0.5.2 |
62e09e7e | 147 | %endif |
12078fdb JB |
148 | |
149 | %description -n spice-glib-devel | |
150 | Header files for SPICE Client GLib library. | |
151 | ||
152 | %description -n spice-glib-devel -l pl.UTF-8 | |
153 | Pliki nagłówkowe biblioteki klienckiej SPICE GLib. | |
154 | ||
155 | %package -n spice-glib-static | |
156 | Summary: SPICE Client GLib static library | |
157 | Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GLib | |
158 | Group: Development/Libraries | |
159 | Requires: spice-glib-devel = %{version}-%{release} | |
160 | ||
161 | %description -n spice-glib-static | |
162 | SPICE Client GLib static library. | |
163 | ||
164 | %description -n spice-glib-static -l pl.UTF-8 | |
165 | Statyczna biblioteka kliencka SPICE GLib. | |
166 | ||
62e09e7e JB |
167 | %package -n spice-glib-usb |
168 | Summary: USB redirection ACL helper for SPICE Client GLib library | |
169 | Summary(pl.UTF-8): Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej SPICE GLib | |
170 | Group: Applications/System | |
171 | Requires: spice-glib = %{version}-%{release} | |
61cee34f | 172 | Requires: polkit >= 0.96 |
62e09e7e JB |
173 | |
174 | %description -n spice-glib-usb | |
175 | USB redirection ACL helper for SPICE Client GLib library. | |
176 | ||
177 | %description -n spice-glib-usb -l pl.UTF-8 | |
178 | Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej | |
179 | SPICE GLib. | |
180 | ||
12078fdb JB |
181 | %package -n spice-gtk2 |
182 | Summary: SPICE Client GTK 2.0 library | |
183 | Summary(pl.UTF-8): Biblioteka kliencka SPICE GTK 2.0 | |
184 | Group: X11/Libraries | |
185 | Requires: gtk+2 >= 2:2.18.0 | |
186 | Requires: spice-glib = %{version}-%{release} | |
187 | ||
188 | %description -n spice-gtk2 | |
189 | SPICE Client GTK 2.0 library. | |
190 | ||
191 | %description -n spice-gtk2 -l pl.UTF-8 | |
192 | Biblioteka kliencka SPICE GTK 2.0. | |
193 | ||
194 | %package -n spice-gtk2-devel | |
195 | Summary: Header files for SPICE Client GTK 2.0 library | |
196 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0 | |
197 | Group: X11/Development/Libraries | |
198 | Requires: gtk+2-devel >= 2:2.18.0 | |
199 | Requires: spice-glib-devel = %{version}-%{release} | |
200 | ||
201 | %description -n spice-gtk2-devel | |
202 | Header files for SPICE Client GTK 2.0 library. | |
203 | ||
204 | %description -n spice-gtk2-devel -l pl.UTF-8 | |
205 | Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0. | |
206 | ||
207 | %package -n spice-gtk2-static | |
208 | Summary: SPICE Client GTK 2.0 static library | |
209 | Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 2.0 | |
210 | Group: X11/Development/Libraries | |
211 | Requires: spice-gtk2-devel = %{version}-%{release} | |
212 | ||
213 | %description -n spice-gtk2-static | |
214 | SPICE Client GTK 2.0 static library. | |
215 | ||
216 | %description -n spice-gtk2-static -l pl.UTF-8 | |
217 | Statyczna biblioteka kliencka SPICE GTK 2.0. | |
887be46e JB |
218 | |
219 | %package -n python-spice-gtk | |
220 | Summary: Python interface to SPICE client GTK library | |
221 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki klienckiej SPICE GTK | |
222 | Group: Libraries/Python | |
12078fdb | 223 | Requires: spice-gtk2 = %{version}-%{release} |
887be46e JB |
224 | |
225 | %description -n python-spice-gtk | |
226 | Python interface to SPICE client GTK library. | |
227 | ||
228 | %description -n python-spice-gtk -l pl.UTF-8 | |
229 | Pythonowy interfejs do biblioteki klienckiej SPICE GTK. | |
230 | ||
12078fdb JB |
231 | %package -n vala-spice-protocol |
232 | Summary: Vala API for SPICE client library | |
233 | Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE | |
887be46e | 234 | Group: Development/Libraries |
61cee34f | 235 | Requires: spice-protocol >= 0.10.1 |
178a4f62 | 236 | Requires: vala >= 2:0.14 |
887be46e | 237 | |
12078fdb JB |
238 | %description -n vala-spice-protocol |
239 | Vala API for SPICE client library. | |
887be46e | 240 | |
12078fdb JB |
241 | %description -n vala-spice-protocol -l pl.UTF-8 |
242 | Interfejs języka Vala do biblioteki klienckiej SPICE. | |
887be46e JB |
243 | |
244 | %prep | |
245 | %setup -q | |
246 | %patch0 -p1 | |
62e09e7e | 247 | %patch1 -p1 |
12078fdb | 248 | |
62e09e7e | 249 | mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3} |
887be46e JB |
250 | |
251 | %build | |
887be46e JB |
252 | %{__intltoolize} |
253 | %{__libtoolize} | |
254 | %{__aclocal} -I m4 | |
255 | %{__autoconf} | |
256 | %{__autoheader} | |
257 | %{__automake} | |
12078fdb | 258 | |
62e09e7e | 259 | %if %{with gtk2} |
12078fdb JB |
260 | cd gtk2 |
261 | ../%configure \ | |
6cda7c5a | 262 | --enable-lz4 \ |
887be46e | 263 | --disable-silent-rules \ |
62e09e7e | 264 | %{!?with_smartcard:--disable-smartcard} \ |
6cda7c5a | 265 | %{?with_static_libs:--enable-static} \ |
62e09e7e | 266 | %{!?with_usbredir:--disable-usbredir} \ |
12078fdb JB |
267 | --with-gtk=2.0 \ |
268 | --with-html-dir=%{_gtkdocdir} | |
54d84664 | 269 | %{__make} |
62e09e7e JB |
270 | cd .. |
271 | %endif | |
12078fdb | 272 | |
62e09e7e JB |
273 | %if %{with gtk3} |
274 | cd gtk3 | |
12078fdb | 275 | ../%configure \ |
6cda7c5a JB |
276 | --enable-gtk-doc \ |
277 | --enable-lz4 \ | |
12078fdb | 278 | --disable-silent-rules \ |
62e09e7e | 279 | %{!?with_smartcard:--disable-smartcard} \ |
6cda7c5a | 280 | %{?with_static_libs:--enable-static} \ |
62e09e7e | 281 | %{!?with_usbredir:--disable-usbredir} \ |
12078fdb | 282 | --with-gtk=3.0 \ |
887be46e | 283 | --with-html-dir=%{_gtkdocdir} |
54d84664 | 284 | %{__make} |
62e09e7e | 285 | %endif |
887be46e JB |
286 | |
287 | %install | |
288 | rm -rf $RPM_BUILD_ROOT | |
289 | ||
12078fdb | 290 | # gtk2 first, so executables will use gtk3 libs |
62e09e7e | 291 | %if %{with gtk2} |
54d84664 | 292 | %{__make} -C gtk2 install -j1 \ |
12078fdb | 293 | DESTDIR=$RPM_BUILD_ROOT |
62e09e7e | 294 | %endif |
12078fdb | 295 | |
62e09e7e | 296 | %if %{with gtk3} |
54d84664 | 297 | %{__make} -C gtk3 install -j1 \ |
887be46e | 298 | DESTDIR=$RPM_BUILD_ROOT |
62e09e7e | 299 | %endif |
887be46e | 300 | |
6cda7c5a JB |
301 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la |
302 | %if %{with static_libs} | |
303 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a | |
304 | %endif | |
887be46e JB |
305 | # obsoleted by pkg-config |
306 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
307 | ||
308 | %find_lang %{name} | |
309 | ||
310 | %clean | |
311 | rm -rf $RPM_BUILD_ROOT | |
312 | ||
313 | %post -p /sbin/ldconfig | |
314 | %postun -p /sbin/ldconfig | |
315 | ||
12078fdb JB |
316 | %post -n spice-glib -p /sbin/ldconfig |
317 | %postun -n spice-glib -p /sbin/ldconfig | |
318 | ||
319 | %post -n spice-gtk2 -p /sbin/ldconfig | |
320 | %postun -n spice-gtk2 -p /sbin/ldconfig | |
321 | ||
62e09e7e | 322 | %if %{with gtk3} |
887be46e JB |
323 | %files -f %{name}.lang |
324 | %defattr(644,root,root,755) | |
325 | %doc AUTHORS NEWS README THANKS TODO | |
887be46e | 326 | %attr(755,root,root) %{_bindir}/spicy |
82d73980 | 327 | %attr(755,root,root) %{_bindir}/spicy-screenshot |
12078fdb JB |
328 | %attr(755,root,root) %{_bindir}/spicy-stats |
329 | %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so.*.*.* | |
35affeb9 | 330 | %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.4 |
12078fdb | 331 | %{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib |
6cda7c5a | 332 | %{_mandir}/man1/spice-client.1* |
12078fdb JB |
333 | |
334 | %files devel | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so | |
337 | %{_includedir}/spice-client-gtk-3.0 | |
338 | %{_pkgconfigdir}/spice-client-gtk-3.0.pc | |
339 | %{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir | |
340 | ||
6cda7c5a | 341 | %if %{with static_libs} |
12078fdb JB |
342 | %files static |
343 | %defattr(644,root,root,755) | |
344 | %{_libdir}/libspice-client-gtk-3.0.a | |
6cda7c5a | 345 | %endif |
12078fdb JB |
346 | |
347 | %files apidocs | |
348 | %defattr(644,root,root,755) | |
349 | %{_gtkdocdir}/spice-gtk | |
62e09e7e | 350 | %endif |
12078fdb JB |
351 | |
352 | %files -n spice-glib | |
353 | %defattr(644,root,root,755) | |
887be46e | 354 | %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so.*.*.* |
35affeb9 | 355 | %attr(755,root,root) %ghost %{_libdir}/libspice-client-glib-2.0.so.8 |
887be46e JB |
356 | %attr(755,root,root) %{_libdir}/libspice-controller.so.*.*.* |
357 | %attr(755,root,root) %ghost %{_libdir}/libspice-controller.so.0 | |
358 | %{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib | |
887be46e | 359 | |
12078fdb | 360 | %files -n spice-glib-devel |
887be46e JB |
361 | %defattr(644,root,root,755) |
362 | %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so | |
887be46e JB |
363 | %attr(755,root,root) %{_libdir}/libspice-controller.so |
364 | %{_includedir}/spice-client-glib-2.0 | |
887be46e JB |
365 | %{_includedir}/spice-controller |
366 | %{_pkgconfigdir}/spice-client-glib-2.0.pc | |
887be46e JB |
367 | %{_pkgconfigdir}/spice-controller.pc |
368 | %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir | |
887be46e | 369 | |
6cda7c5a | 370 | %if %{with static_libs} |
12078fdb | 371 | %files -n spice-glib-static |
887be46e JB |
372 | %defattr(644,root,root,755) |
373 | %{_libdir}/libspice-client-glib-2.0.a | |
887be46e | 374 | %{_libdir}/libspice-controller.a |
6cda7c5a | 375 | %endif |
887be46e | 376 | |
62e09e7e JB |
377 | %if %{with usbredir} |
378 | %files -n spice-glib-usb | |
379 | %defattr(644,root,root,755) | |
380 | %attr(755,root,root) %{_bindir}/spice-client-glib-usb-acl-helper | |
381 | %{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy | |
382 | %endif | |
383 | ||
384 | %if %{with gtk2} | |
12078fdb | 385 | %files -n spice-gtk2 |
887be46e | 386 | %defattr(644,root,root,755) |
12078fdb | 387 | %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so.*.*.* |
35affeb9 | 388 | %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-2.0.so.4 |
12078fdb JB |
389 | %{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib |
390 | ||
391 | %files -n spice-gtk2-devel | |
392 | %defattr(644,root,root,755) | |
393 | %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so | |
394 | %{_includedir}/spice-client-gtk-2.0 | |
395 | %{_pkgconfigdir}/spice-client-gtk-2.0.pc | |
396 | %{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir | |
397 | ||
6cda7c5a | 398 | %if %{with static_libs} |
12078fdb JB |
399 | %files -n spice-gtk2-static |
400 | %defattr(644,root,root,755) | |
401 | %{_libdir}/libspice-client-gtk-2.0.a | |
6cda7c5a | 402 | %endif |
887be46e JB |
403 | |
404 | %files -n python-spice-gtk | |
405 | %defattr(644,root,root,755) | |
406 | %attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so | |
62e09e7e | 407 | %endif |
887be46e | 408 | |
12078fdb | 409 | %files -n vala-spice-protocol |
887be46e JB |
410 | %defattr(644,root,root,755) |
411 | %{_datadir}/vala/vapi/spice-protocol.vapi |