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: 723e0e9ce9d507ba5d6cd331a3a9b7fb
18 Patch0: %{name}-builddir.patch
19 Patch1: %{name}-am.patch
20 Patch2: %{name}-codegen.patch
21 URL: http://spice-space.org/
22 BuildRequires: autoconf >= 2.63
23 BuildRequires: automake >= 1:1.11
24 BuildRequires: cairo-devel >= 1.2.0
25 BuildRequires: celt051-devel >= 0.5.1.1
26 BuildRequires: cyrus-sasl-devel >= 2.0
27 BuildRequires: gcc >= 5:3.0
28 BuildRequires: gettext-tools >= 0.17
29 BuildRequires: gobject-introspection-devel >= 0.9.4
30 BuildRequires: glib2-devel >= 1:2.44
31 BuildRequires: gtk-doc >= 1.14
32 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0}
33 %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
34 BuildRequires: intltool >= 0.40.0
35 %{?with_smartcard:BuildRequires: libcacard-devel >= 0.1.2}
36 BuildRequires: libjpeg-devel
37 BuildRequires: libsoup-devel >= 2.50
38 BuildRequires: libstdc++-devel
39 BuildRequires: libtool >= 2:2.0
40 BuildRequires: lz4-devel
41 BuildRequires: openssl-devel
42 BuildRequires: opus-devel >= 0.9.14
43 BuildRequires: perl-Text-CSV
44 BuildRequires: perl-base >= 1:5.8.1
45 BuildRequires: phodav-devel >= 2.0
46 BuildRequires: pixman-devel >= 0.17.7
47 BuildRequires: pkgconfig
48 BuildRequires: pulseaudio-devel
49 BuildRequires: sed >= 4.0
50 BuildRequires: spice-protocol >= 0.12.10
51 BuildRequires: spice-protocol-codegen >= 0.12.10
52 BuildRequires: xorg-lib-libX11-devel
53 BuildRequires: xorg-lib-libXrandr-devel
54 BuildRequires: zlib-devel
56 BuildRequires: gtk+2-devel >= 2:2.18.0
57 BuildRequires: python-devel >= 2.0
58 BuildRequires: python-pygtk-devel >= 2:2.0.0
61 BuildRequires: acl-devel
62 BuildRequires: libusb-devel >= 1.0.16
63 BuildRequires: polkit-devel >= 0.96
64 BuildRequires: usbredir-devel >= 0.5.2
66 %{?with_smartcard:Requires: libcacard >= 0.1.2}
67 Requires: spice-glib = %{version}-%{release}
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71 A GTK+ client and libraries for SPICE remote desktop servers.
73 %description -l pl.UTF-8
74 Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE.
77 Summary: Header files for SPICE GTK 3.0 client library
78 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0
79 Group: X11/Development/Libraries
80 Requires: %{name} = %{version}-%{release}
81 Requires: spice-glib-devel = %{version}-%{release}
82 Requires: gtk+3-devel >= 3.0
85 Header files for SPICE GTK 3.0 client library.
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0.
91 Summary: Static SPICE GTK 3.0 client library
92 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 3.0
93 Group: X11/Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
97 Static SPICE GTK 3.0 client library.
99 %description static -l pl.UTF-8
100 Statyczna biblioteka kliencka SPICE GTK 3.0.
103 Summary: SPICE GTK API documentation
104 Summary(pl.UTF-8): Dokumentacja API bibliotek SPICE GTK
108 API documentation for SPICE GTK libraries.
110 %description apidocs -l pl.UTF-8
111 Dokumentacja API bibliotek SPICE GTK.
113 %package -n spice-glib
114 Summary: SPICE Client GLib library
115 Summary(pl.UTF-8): Biblioteka kliencka SPICE GLib
117 Requires: celt051 >= 0.5.1.1
118 Requires: glib2 >= 1:2.44
119 %{?with_smartcard:Requires: libcacard >= 0.1.2}
120 Requires: libsoup >= 2.50
121 Requires: opus >= 0.9.14
122 Requires: pixman >= 0.17.7
124 Requires: libusb >= 1.0.16
125 Requires: usbredir >= 0.5.2
128 %description -n spice-glib
129 SPICE Client GLib library.
131 %description -n spice-glib -l pl.UTF-8
132 Biblioteka kliencka SPICE GLib.
134 %package -n spice-glib-devel
135 Summary: Header files for SPICE Client GLib library
136 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GLib
137 Group: Development/Libraries
138 Requires: celt051-devel >= 0.5.1.1
139 Requires: cyrus-sasl-devel >= 2.0
140 Requires: glib2-devel >= 1:2.44
141 %{?with_smartcard:Requires: libcacard-devel >= 0.1.2}
142 Requires: libjpeg-devel
143 Requires: openssl-devel
144 Requires: pixman-devel >= 0.17.7
145 Requires: pulseaudio-devel
146 Requires: spice-glib = %{version}-%{release}
147 Requires: spice-protocol >= 0.12.10
149 Requires: libusb-devel >= 1.0.16
150 Requires: usbredir-devel >= 0.5.2
153 %description -n spice-glib-devel
154 Header files for SPICE Client GLib library.
156 %description -n spice-glib-devel -l pl.UTF-8
157 Pliki nagłówkowe biblioteki klienckiej SPICE GLib.
159 %package -n spice-glib-static
160 Summary: SPICE Client GLib static library
161 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GLib
162 Group: Development/Libraries
163 Requires: spice-glib-devel = %{version}-%{release}
165 %description -n spice-glib-static
166 SPICE Client GLib static library.
168 %description -n spice-glib-static -l pl.UTF-8
169 Statyczna biblioteka kliencka SPICE GLib.
171 %package -n spice-glib-usb
172 Summary: USB redirection ACL helper for SPICE Client GLib library
173 Summary(pl.UTF-8): Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej SPICE GLib
174 Group: Applications/System
175 Requires: spice-glib = %{version}-%{release}
176 Requires: polkit >= 0.96
178 %description -n spice-glib-usb
179 USB redirection ACL helper for SPICE Client GLib library.
181 %description -n spice-glib-usb -l pl.UTF-8
182 Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej
185 %package -n spice-gtk2
186 Summary: SPICE Client GTK 2.0 library
187 Summary(pl.UTF-8): Biblioteka kliencka SPICE GTK 2.0
189 Requires: gtk+2 >= 2:2.18.0
190 Requires: spice-glib = %{version}-%{release}
192 %description -n spice-gtk2
193 SPICE Client GTK 2.0 library.
195 %description -n spice-gtk2 -l pl.UTF-8
196 Biblioteka kliencka SPICE GTK 2.0.
198 %package -n spice-gtk2-devel
199 Summary: Header files for SPICE Client GTK 2.0 library
200 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0
201 Group: X11/Development/Libraries
202 Requires: gtk+2-devel >= 2:2.18.0
203 Requires: spice-glib-devel = %{version}-%{release}
205 %description -n spice-gtk2-devel
206 Header files for SPICE Client GTK 2.0 library.
208 %description -n spice-gtk2-devel -l pl.UTF-8
209 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0.
211 %package -n spice-gtk2-static
212 Summary: SPICE Client GTK 2.0 static library
213 Summary(pl.UTF-8): Statyczna biblioteka kliencka SPICE GTK 2.0
214 Group: X11/Development/Libraries
215 Requires: spice-gtk2-devel = %{version}-%{release}
217 %description -n spice-gtk2-static
218 SPICE Client GTK 2.0 static library.
220 %description -n spice-gtk2-static -l pl.UTF-8
221 Statyczna biblioteka kliencka SPICE GTK 2.0.
223 %package -n python-spice-gtk
224 Summary: Python interface to SPICE client GTK library
225 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki klienckiej SPICE GTK
226 Group: Libraries/Python
227 Requires: spice-gtk2 = %{version}-%{release}
229 %description -n python-spice-gtk
230 Python interface to SPICE client GTK library.
232 %description -n python-spice-gtk -l pl.UTF-8
233 Pythonowy interfejs do biblioteki klienckiej SPICE GTK.
235 %package -n vala-spice-protocol
236 Summary: Vala API for SPICE client library
237 Summary(pl.UTF-8): Interfejs języka Vala do biblioteki klienckiej SPICE
238 Group: Development/Libraries
239 Requires: spice-protocol >= 0.12.10
240 Requires: vala >= 2:0.14
242 %description -n vala-spice-protocol
243 Vala API for SPICE client library.
245 %description -n vala-spice-protocol -l pl.UTF-8
246 Interfejs języka Vala do biblioteki klienckiej SPICE.
254 mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3}
274 --disable-silent-rules \
275 %{!?with_smartcard:--disable-smartcard} \
276 %{?with_static_libs:--enable-static} \
277 %{!?with_usbredir:--disable-usbredir} \
279 --with-html-dir=%{_gtkdocdir} \
280 --with-pnp-ids-path=/lib/hwdata/pnp.ids \
281 --with-usb-ids-path=/lib/hwdata/usb.ids
291 --disable-silent-rules \
292 %{!?with_smartcard:--disable-smartcard} \
293 %{?with_static_libs:--enable-static} \
294 %{!?with_usbredir:--disable-usbredir} \
296 --with-html-dir=%{_gtkdocdir} \
297 --with-pnp-ids-path=/lib/hwdata/pnp.ids \
298 --with-usb-ids-path=/lib/hwdata/usb.ids
303 rm -rf $RPM_BUILD_ROOT
305 # gtk2 first, so executables will use gtk3 libs
307 %{__make} -C gtk2 install -j1 \
308 DESTDIR=$RPM_BUILD_ROOT
312 %{__make} -C gtk3 install -j1 \
313 DESTDIR=$RPM_BUILD_ROOT
316 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la
317 %if %{with static_libs}
318 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a
320 # obsoleted by pkg-config
321 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
326 rm -rf $RPM_BUILD_ROOT
328 %post -p /sbin/ldconfig
329 %postun -p /sbin/ldconfig
331 %post -n spice-glib -p /sbin/ldconfig
332 %postun -n spice-glib -p /sbin/ldconfig
334 %post -n spice-gtk2 -p /sbin/ldconfig
335 %postun -n spice-gtk2 -p /sbin/ldconfig
338 %files -f %{name}.lang
339 %defattr(644,root,root,755)
340 %doc AUTHORS NEWS README THANKS TODO
341 %attr(755,root,root) %{_bindir}/spicy
342 %attr(755,root,root) %{_bindir}/spicy-screenshot
343 %attr(755,root,root) %{_bindir}/spicy-stats
344 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so.*.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.4
346 %{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib
347 %{_mandir}/man1/spice-client.1*
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so
352 %{_includedir}/spice-client-gtk-3.0
353 %{_pkgconfigdir}/spice-client-gtk-3.0.pc
354 %{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir
356 %if %{with static_libs}
358 %defattr(644,root,root,755)
359 %{_libdir}/libspice-client-gtk-3.0.a
363 %defattr(644,root,root,755)
364 %{_gtkdocdir}/spice-gtk
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so.*.*.*
370 %attr(755,root,root) %ghost %{_libdir}/libspice-client-glib-2.0.so.8
371 %attr(755,root,root) %{_libdir}/libspice-controller.so.*.*.*
372 %attr(755,root,root) %ghost %{_libdir}/libspice-controller.so.0
373 %{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib
375 %files -n spice-glib-devel
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so
378 %attr(755,root,root) %{_libdir}/libspice-controller.so
379 %{_includedir}/spice-client-glib-2.0
380 %{_includedir}/spice-controller
381 %{_pkgconfigdir}/spice-client-glib-2.0.pc
382 %{_pkgconfigdir}/spice-controller.pc
383 %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir
385 %if %{with static_libs}
386 %files -n spice-glib-static
387 %defattr(644,root,root,755)
388 %{_libdir}/libspice-client-glib-2.0.a
389 %{_libdir}/libspice-controller.a
393 %files -n spice-glib-usb
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/spice-client-glib-usb-acl-helper
396 %{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so.*.*.*
403 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-2.0.so.4
404 %{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib
406 %files -n spice-gtk2-devel
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so
409 %{_includedir}/spice-client-gtk-2.0
410 %{_pkgconfigdir}/spice-client-gtk-2.0.pc
411 %{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir
413 %if %{with static_libs}
414 %files -n spice-gtk2-static
415 %defattr(644,root,root,755)
416 %{_libdir}/libspice-client-gtk-2.0.a
419 %files -n python-spice-gtk
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so
424 %files -n vala-spice-protocol
425 %defattr(644,root,root,755)
426 %{_datadir}/vala/vapi/spice-protocol.vapi