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
7 %bcond_without static_libs # static libraries
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
15 Group: X11/Applications
16 Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}.tar.bz2
17 # Source0-md5: 1ef438eabc19b0f339d746a93cab4f56
18 Patch0: %{name}-builddir.patch
19 Patch1: %{name}-am.patch
20 URL: http://spice-space.org/
21 BuildRequires: autoconf >= 2.63
22 BuildRequires: automake >= 1:1.11
23 BuildRequires: cairo-devel >= 1.2.0
24 BuildRequires: celt051-devel >= 0.5.1.1
25 BuildRequires: cyrus-sasl-devel >= 2.0
26 BuildRequires: gcc >= 5:3.0
27 BuildRequires: gettext-tools >= 0.17
28 BuildRequires: glib2-devel >= 1:2.44
29 BuildRequires: gobject-introspection-devel >= 0.9.4
30 BuildRequires: gstreamer-devel >= 1.0
31 BuildRequires: gstreamer-plugins-base-devel >= 1.0
32 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0}
33 %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
34 BuildRequires: gtk-doc >= 1.14
35 BuildRequires: intltool >= 0.40.0
36 %{?with_smartcard:BuildRequires: libcacard-devel >= 0.1.2}
37 BuildRequires: libepoxy-devel
38 BuildRequires: libjpeg-devel
39 BuildRequires: libsoup-devel >= 2.50
40 BuildRequires: libstdc++-devel
41 BuildRequires: libtool >= 2:2.0
42 BuildRequires: lz4-devel
43 BuildRequires: openssl-devel
44 BuildRequires: opus-devel >= 0.9.14
45 BuildRequires: perl-Text-CSV
46 BuildRequires: perl-base >= 1:5.8.1
47 BuildRequires: phodav-devel >= 2.0
48 BuildRequires: pixman-devel >= 0.17.7
49 BuildRequires: pkgconfig
50 BuildRequires: pulseaudio-devel
51 BuildRequires: python >= 2
52 BuildRequires: python-pyparsing
53 BuildRequires: python-six
54 BuildRequires: sed >= 4.0
55 BuildRequires: spice-protocol >= 0.12.11
56 BuildRequires: xorg-lib-libX11-devel
57 BuildRequires: xorg-lib-libXrandr-devel
58 BuildRequires: zlib-devel
60 BuildRequires: gtk+2-devel >= 2:2.18.0
61 BuildRequires: python-devel >= 2.0
62 BuildRequires: python-pygtk-devel >= 2:2.0.0
65 BuildRequires: acl-devel
66 BuildRequires: libusb-devel >= 1.0.16
67 BuildRequires: polkit-devel >= 0.96
68 BuildRequires: usbredir-devel >= 0.5.2
70 %{?with_smartcard:Requires: libcacard >= 0.1.2}
71 Requires: spice-glib = %{version}-%{release}
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 A GTK+ client and libraries for SPICE remote desktop servers.
77 %description -l pl.UTF-8
78 Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE.
81 Summary: Header files for SPICE GTK 3.0 client library
82 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0
83 Group: X11/Development/Libraries
84 Requires: %{name} = %{version}-%{release}
85 Requires: gtk+3-devel >= 3.0
86 Requires: spice-glib-devel = %{version}-%{release}
89 Header files for SPICE GTK 3.0 client library.
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0.
95 Summary: Static SPICE GTK 3.0 client library
96 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 3.0
97 Group: X11/Development/Libraries
98 Requires: %{name}-devel = %{version}-%{release}
101 Static SPICE GTK 3.0 client library.
103 %description static -l pl.UTF-8
104 Statyczna biblioteka kliencka SPICE GTK 3.0.
107 Summary: SPICE GTK API documentation
108 Summary(pl.UTF-8): Dokumentacja API bibliotek SPICE GTK
112 API documentation for SPICE GTK libraries.
114 %description apidocs -l pl.UTF-8
115 Dokumentacja API bibliotek SPICE GTK.
117 %package -n spice-glib
118 Summary: SPICE Client GLib library
119 Summary(pl.UTF-8): Biblioteka kliencka SPICE GLib
121 Requires: celt051 >= 0.5.1.1
122 Requires: glib2 >= 1:2.44
123 %{?with_smartcard:Requires: libcacard >= 0.1.2}
124 Requires: libsoup >= 2.50
125 Requires: opus >= 0.9.14
126 Requires: pixman >= 0.17.7
128 Requires: libusb >= 1.0.16
129 Requires: usbredir >= 0.5.2
132 %description -n spice-glib
133 SPICE Client GLib library.
135 %description -n spice-glib -l pl.UTF-8
136 Biblioteka kliencka SPICE GLib.
138 %package -n spice-glib-devel
139 Summary: Header files for SPICE Client GLib library
140 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GLib
141 Group: Development/Libraries
142 Requires: celt051-devel >= 0.5.1.1
143 Requires: cyrus-sasl-devel >= 2.0
144 Requires: glib2-devel >= 1:2.44
145 %{?with_smartcard:Requires: libcacard-devel >= 0.1.2}
146 Requires: libjpeg-devel
147 Requires: openssl-devel
148 Requires: pixman-devel >= 0.17.7
149 Requires: pulseaudio-devel
150 Requires: spice-glib = %{version}-%{release}
151 Requires: spice-protocol >= 0.12.11
153 Requires: libusb-devel >= 1.0.16
154 Requires: usbredir-devel >= 0.5.2
157 %description -n spice-glib-devel
158 Header files for SPICE Client GLib library.
160 %description -n spice-glib-devel -l pl.UTF-8
161 Pliki nagłówkowe biblioteki klienckiej SPICE GLib.
163 %package -n spice-glib-static
164 Summary: SPICE Client GLib static library
165 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GLib
166 Group: Development/Libraries
167 Requires: spice-glib-devel = %{version}-%{release}
169 %description -n spice-glib-static
170 SPICE Client GLib static library.
172 %description -n spice-glib-static -l pl.UTF-8
173 Statyczna biblioteka kliencka SPICE GLib.
175 %package -n spice-glib-usb
176 Summary: USB redirection ACL helper for SPICE Client GLib library
177 Summary(pl.UTF-8): Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej SPICE GLib
178 Group: Applications/System
179 Requires: polkit >= 0.96
180 Requires: spice-glib = %{version}-%{release}
182 %description -n spice-glib-usb
183 USB redirection ACL helper for SPICE Client GLib library.
185 %description -n spice-glib-usb -l pl.UTF-8
186 Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej
189 %package -n spice-gtk2
190 Summary: SPICE Client GTK 2.0 library
191 Summary(pl.UTF-8): Biblioteka kliencka SPICE GTK 2.0
193 Requires: gtk+2 >= 2:2.18.0
194 Requires: spice-glib = %{version}-%{release}
196 %description -n spice-gtk2
197 SPICE Client GTK 2.0 library.
199 %description -n spice-gtk2 -l pl.UTF-8
200 Biblioteka kliencka SPICE GTK 2.0.
202 %package -n spice-gtk2-devel
203 Summary: Header files for SPICE Client GTK 2.0 library
204 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0
205 Group: X11/Development/Libraries
206 Requires: gtk+2-devel >= 2:2.18.0
207 Requires: spice-glib-devel = %{version}-%{release}
209 %description -n spice-gtk2-devel
210 Header files for SPICE Client GTK 2.0 library.
212 %description -n spice-gtk2-devel -l pl.UTF-8
213 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0.
215 %package -n spice-gtk2-static
216 Summary: SPICE Client GTK 2.0 static library
217 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 2.0
218 Group: X11/Development/Libraries
219 Requires: spice-gtk2-devel = %{version}-%{release}
221 %description -n spice-gtk2-static
222 SPICE Client GTK 2.0 static library.
224 %description -n spice-gtk2-static -l pl.UTF-8
225 Statyczna biblioteka kliencka SPICE GTK 2.0.
227 %package -n python-spice-gtk
228 Summary: Python interface to SPICE client GTK library
229 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki klienckiej SPICE GTK
230 Group: Libraries/Python
231 Requires: spice-gtk2 = %{version}-%{release}
233 %description -n python-spice-gtk
234 Python interface to SPICE client GTK library.
236 %description -n python-spice-gtk -l pl.UTF-8
237 Pythonowy interfejs do biblioteki klienckiej SPICE GTK.
239 %package -n vala-spice-protocol
240 Summary: Vala API for SPICE client library
241 Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE
242 Group: Development/Libraries
243 Requires: spice-protocol >= 0.12.11
244 Requires: vala >= 2:0.14
245 %if "%{_rpmversion}" >= "5"
249 %description -n vala-spice-protocol
250 Vala API for SPICE client library.
252 %description -n vala-spice-protocol -l pl.UTF-8
253 Interfejs języka Vala do biblioteki klienckiej SPICE.
260 mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3}
280 --disable-silent-rules \
281 %{!?with_smartcard:--disable-smartcard} \
282 %{?with_static_libs:--enable-static} \
283 %{!?with_usbredir:--disable-usbredir} \
285 --with-html-dir=%{_gtkdocdir} \
286 --with-pnp-ids-path=/lib/hwdata/pnp.ids \
287 --with-usb-ids-path=/lib/hwdata/usb.ids
297 --disable-silent-rules \
298 %{!?with_smartcard:--disable-smartcard} \
299 %{?with_static_libs:--enable-static} \
300 %{!?with_usbredir:--disable-usbredir} \
302 --with-html-dir=%{_gtkdocdir} \
303 --with-pnp-ids-path=/lib/hwdata/pnp.ids \
304 --with-usb-ids-path=/lib/hwdata/usb.ids
309 rm -rf $RPM_BUILD_ROOT
311 # gtk2 first, so executables will use gtk3 libs
313 %{__make} -C gtk2 install -j1 \
314 DESTDIR=$RPM_BUILD_ROOT
318 %{__make} -C gtk3 install -j1 \
319 DESTDIR=$RPM_BUILD_ROOT
322 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la
323 %if %{with static_libs}
324 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a
326 # obsoleted by pkg-config
327 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
332 rm -rf $RPM_BUILD_ROOT
334 %post -p /sbin/ldconfig
335 %postun -p /sbin/ldconfig
337 %post -n spice-glib -p /sbin/ldconfig
338 %postun -n spice-glib -p /sbin/ldconfig
340 %post -n spice-gtk2 -p /sbin/ldconfig
341 %postun -n spice-gtk2 -p /sbin/ldconfig
344 %files -f %{name}.lang
345 %defattr(644,root,root,755)
346 %doc AUTHORS NEWS README THANKS TODO
347 %attr(755,root,root) %{_bindir}/spicy
348 %attr(755,root,root) %{_bindir}/spicy-screenshot
349 %attr(755,root,root) %{_bindir}/spicy-stats
350 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so.*.*.*
351 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.4
352 %{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib
353 %{_mandir}/man1/spice-client.1*
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so
358 %{_includedir}/spice-client-gtk-3.0
359 %{_pkgconfigdir}/spice-client-gtk-3.0.pc
360 %{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir
362 %if %{with static_libs}
364 %defattr(644,root,root,755)
365 %{_libdir}/libspice-client-gtk-3.0.a
369 %defattr(644,root,root,755)
370 %{_gtkdocdir}/spice-gtk
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so.*.*.*
376 %attr(755,root,root) %ghost %{_libdir}/libspice-client-glib-2.0.so.8
377 %attr(755,root,root) %{_libdir}/libspice-controller.so.*.*.*
378 %attr(755,root,root) %ghost %{_libdir}/libspice-controller.so.0
379 %{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib
381 %files -n spice-glib-devel
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so
384 %attr(755,root,root) %{_libdir}/libspice-controller.so
385 %{_includedir}/spice-client-glib-2.0
386 %{_includedir}/spice-controller
387 %{_pkgconfigdir}/spice-client-glib-2.0.pc
388 %{_pkgconfigdir}/spice-controller.pc
389 %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir
391 %if %{with static_libs}
392 %files -n spice-glib-static
393 %defattr(644,root,root,755)
394 %{_libdir}/libspice-client-glib-2.0.a
395 %{_libdir}/libspice-controller.a
399 %files -n spice-glib-usb
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_bindir}/spice-client-glib-usb-acl-helper
402 %{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so.*.*.*
409 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-2.0.so.4
410 %{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib
412 %files -n spice-gtk2-devel
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so
415 %{_includedir}/spice-client-gtk-2.0
416 %{_pkgconfigdir}/spice-client-gtk-2.0.pc
417 %{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir
419 %if %{with static_libs}
420 %files -n spice-gtk2-static
421 %defattr(644,root,root,755)
422 %{_libdir}/libspice-client-gtk-2.0.a
425 %files -n python-spice-gtk
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so
430 %files -n vala-spice-protocol
431 %defattr(644,root,root,755)
432 %{_datadir}/vala/vapi/spice-protocol.vapi