]> git.pld-linux.org Git - packages/spice-gtk.git/blob - spice-gtk.spec
noarch vala subpackage
[packages/spice-gtk.git] / spice-gtk.spec
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
7 %bcond_without  static_libs     # static libraries
8
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
12 Version:        0.30
13 Release:        3
14 License:        LGPL v2.1+
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:  glib2-devel >= 1:2.44
30 BuildRequires:  gobject-introspection-devel >= 0.9.4
31 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.18.0}
32 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.0}
33 BuildRequires:  gtk-doc >= 1.14
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
55 %if %{with gtk2}
56 BuildRequires:  gtk+2-devel >= 2:2.18.0
57 BuildRequires:  python-devel >= 2.0
58 BuildRequires:  python-pygtk-devel >= 2:2.0.0
59 %endif
60 %if %{with usbredir}
61 BuildRequires:  acl-devel
62 BuildRequires:  libusb-devel >= 1.0.16
63 BuildRequires:  polkit-devel >= 0.96
64 BuildRequires:  usbredir-devel >= 0.5.2
65 %endif
66 %{?with_smartcard:Requires:     libcacard >= 0.1.2}
67 Requires:       spice-glib = %{version}-%{release}
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %description
71 A GTK+ client and libraries for SPICE remote desktop servers.
72
73 %description -l pl.UTF-8
74 Klient i biblioteki GTK+ dla serwerów zdalnych pulpitów SPICE.
75
76 %package devel
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:       gtk+3-devel >= 3.0
82 Requires:       spice-glib-devel = %{version}-%{release}
83
84 %description devel
85 Header files for SPICE GTK 3.0 client library.
86
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 3.0.
89
90 %package static
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}
95
96 %description static
97 Static SPICE GTK 3.0 client library.
98
99 %description static -l pl.UTF-8
100 Statyczna biblioteka kliencka SPICE GTK 3.0.
101
102 %package apidocs
103 Summary:        SPICE GTK API documentation
104 Summary(pl.UTF-8):      Dokumentacja API bibliotek SPICE GTK
105 Group:          Documentation
106
107 %description apidocs
108 API documentation for SPICE GTK libraries.
109
110 %description apidocs -l pl.UTF-8
111 Dokumentacja API bibliotek SPICE GTK.
112
113 %package -n spice-glib
114 Summary:        SPICE Client GLib library
115 Summary(pl.UTF-8):      Biblioteka kliencka SPICE GLib
116 Group:          Libraries
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
123 %if %{with usbredir}
124 Requires:       libusb >= 1.0.16
125 Requires:       usbredir >= 0.5.2
126 %endif
127
128 %description -n spice-glib
129 SPICE Client GLib library.
130
131 %description -n spice-glib -l pl.UTF-8
132 Biblioteka kliencka SPICE GLib.
133
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
148 %if %{with usbredir}
149 Requires:       libusb-devel >= 1.0.16
150 Requires:       usbredir-devel >= 0.5.2
151 %endif
152
153 %description -n spice-glib-devel
154 Header files for SPICE Client GLib library.
155
156 %description -n spice-glib-devel -l pl.UTF-8
157 Pliki nagłówkowe biblioteki klienckiej SPICE GLib.
158
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}
164
165 %description -n spice-glib-static
166 SPICE Client GLib static library.
167
168 %description -n spice-glib-static -l pl.UTF-8
169 Statyczna biblioteka kliencka SPICE GLib.
170
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:       polkit >= 0.96
176 Requires:       spice-glib = %{version}-%{release}
177
178 %description -n spice-glib-usb
179 USB redirection ACL helper for SPICE Client GLib library.
180
181 %description -n spice-glib-usb -l pl.UTF-8
182 Program pomocniczy ACL do przekierowań USB dla biblioteki klienckiej
183 SPICE GLib.
184
185 %package -n spice-gtk2
186 Summary:        SPICE Client GTK 2.0 library
187 Summary(pl.UTF-8):      Biblioteka kliencka SPICE GTK 2.0
188 Group:          X11/Libraries
189 Requires:       gtk+2 >= 2:2.18.0
190 Requires:       spice-glib = %{version}-%{release}
191
192 %description -n spice-gtk2
193 SPICE Client GTK 2.0 library.
194
195 %description -n spice-gtk2 -l pl.UTF-8
196 Biblioteka kliencka SPICE GTK 2.0.
197
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}
204
205 %description -n spice-gtk2-devel
206 Header files for SPICE Client GTK 2.0 library.
207
208 %description -n spice-gtk2-devel -l pl.UTF-8
209 Pliki nagłówkowe biblioteki klienckiej SPICE GTK 2.0.
210
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}
216
217 %description -n spice-gtk2-static
218 SPICE Client GTK 2.0 static library.
219
220 %description -n spice-gtk2-static -l pl.UTF-8
221 Statyczna biblioteka kliencka SPICE GTK 2.0.
222
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}
228
229 %description -n python-spice-gtk
230 Python interface to SPICE client GTK library.
231
232 %description -n python-spice-gtk -l pl.UTF-8
233 Pythonowy interfejs do biblioteki klienckiej SPICE GTK.
234
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
241 %if "%{_rpmversion}" >= "5"
242 BuildArch:      noarch
243 %endif
244
245 %description -n vala-spice-protocol
246 Vala API for SPICE client library.
247
248 %description -n vala-spice-protocol -l pl.UTF-8
249 Interfejs języka Vala do biblioteki klienckiej SPICE.
250
251 %prep
252 %setup -q
253 %patch0 -p1
254 %patch1 -p1
255 %patch2 -p1
256
257 mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3}
258
259 %build
260 %{__intltoolize}
261 %{__libtoolize}
262 %{__aclocal} -I m4
263 %{__autoconf}
264 %{__autoheader}
265 %{__automake}
266 cd spice-common
267 %{__aclocal} -I m4
268 %{__autoconf}
269 %{__autoheader}
270 %{__automake}
271 cd ..
272
273 %if %{with gtk2}
274 cd gtk2
275 ../%configure \
276         --enable-lz4 \
277         --disable-silent-rules \
278         %{!?with_smartcard:--disable-smartcard} \
279         %{?with_static_libs:--enable-static} \
280         %{!?with_usbredir:--disable-usbredir} \
281         --with-gtk=2.0 \
282         --with-html-dir=%{_gtkdocdir} \
283         --with-pnp-ids-path=/lib/hwdata/pnp.ids \
284         --with-usb-ids-path=/lib/hwdata/usb.ids
285 %{__make}
286 cd ..
287 %endif
288
289 %if %{with gtk3}
290 cd gtk3
291 ../%configure \
292         --enable-gtk-doc \
293         --enable-lz4 \
294         --disable-silent-rules \
295         %{!?with_smartcard:--disable-smartcard} \
296         %{?with_static_libs:--enable-static} \
297         %{!?with_usbredir:--disable-usbredir} \
298         --with-gtk=3.0 \
299         --with-html-dir=%{_gtkdocdir} \
300         --with-pnp-ids-path=/lib/hwdata/pnp.ids \
301         --with-usb-ids-path=/lib/hwdata/usb.ids
302 %{__make}
303 %endif
304
305 %install
306 rm -rf $RPM_BUILD_ROOT
307
308 # gtk2 first, so executables will use gtk3 libs
309 %if %{with gtk2}
310 %{__make} -C gtk2 install -j1 \
311         DESTDIR=$RPM_BUILD_ROOT
312 %endif
313
314 %if %{with gtk3}
315 %{__make} -C gtk3 install -j1 \
316         DESTDIR=$RPM_BUILD_ROOT
317 %endif
318
319 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la
320 %if %{with static_libs}
321 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a
322 %endif
323 # obsoleted by pkg-config
324 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
325
326 %find_lang %{name}
327
328 %clean
329 rm -rf $RPM_BUILD_ROOT
330
331 %post   -p /sbin/ldconfig
332 %postun -p /sbin/ldconfig
333
334 %post   -n spice-glib -p /sbin/ldconfig
335 %postun -n spice-glib -p /sbin/ldconfig
336
337 %post   -n spice-gtk2 -p /sbin/ldconfig
338 %postun -n spice-gtk2 -p /sbin/ldconfig
339
340 %if %{with gtk3}
341 %files -f %{name}.lang
342 %defattr(644,root,root,755)
343 %doc AUTHORS NEWS README THANKS TODO
344 %attr(755,root,root) %{_bindir}/spicy
345 %attr(755,root,root) %{_bindir}/spicy-screenshot
346 %attr(755,root,root) %{_bindir}/spicy-stats
347 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so.*.*.*
348 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-3.0.so.4
349 %{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib
350 %{_mandir}/man1/spice-client.1*
351
352 %files devel
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_libdir}/libspice-client-gtk-3.0.so
355 %{_includedir}/spice-client-gtk-3.0
356 %{_pkgconfigdir}/spice-client-gtk-3.0.pc
357 %{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir
358
359 %if %{with static_libs}
360 %files static
361 %defattr(644,root,root,755)
362 %{_libdir}/libspice-client-gtk-3.0.a
363 %endif
364
365 %files apidocs
366 %defattr(644,root,root,755)
367 %{_gtkdocdir}/spice-gtk
368 %endif
369
370 %files -n spice-glib
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so.*.*.*
373 %attr(755,root,root) %ghost %{_libdir}/libspice-client-glib-2.0.so.8
374 %attr(755,root,root) %{_libdir}/libspice-controller.so.*.*.*
375 %attr(755,root,root) %ghost %{_libdir}/libspice-controller.so.0
376 %{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib
377
378 %files -n spice-glib-devel
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libspice-client-glib-2.0.so
381 %attr(755,root,root) %{_libdir}/libspice-controller.so
382 %{_includedir}/spice-client-glib-2.0
383 %{_includedir}/spice-controller
384 %{_pkgconfigdir}/spice-client-glib-2.0.pc
385 %{_pkgconfigdir}/spice-controller.pc
386 %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir
387
388 %if %{with static_libs}
389 %files -n spice-glib-static
390 %defattr(644,root,root,755)
391 %{_libdir}/libspice-client-glib-2.0.a
392 %{_libdir}/libspice-controller.a
393 %endif
394
395 %if %{with usbredir}
396 %files -n spice-glib-usb
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/spice-client-glib-usb-acl-helper
399 %{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy
400 %endif
401
402 %if %{with gtk2}
403 %files -n spice-gtk2
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so.*.*.*
406 %attr(755,root,root) %ghost %{_libdir}/libspice-client-gtk-2.0.so.4
407 %{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib
408
409 %files -n spice-gtk2-devel
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/libspice-client-gtk-2.0.so
412 %{_includedir}/spice-client-gtk-2.0
413 %{_pkgconfigdir}/spice-client-gtk-2.0.pc
414 %{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir
415
416 %if %{with static_libs}
417 %files -n spice-gtk2-static
418 %defattr(644,root,root,755)
419 %{_libdir}/libspice-client-gtk-2.0.a
420 %endif
421
422 %files -n python-spice-gtk
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so
425 %endif
426
427 %files -n vala-spice-protocol
428 %defattr(644,root,root,755)
429 %{_datadir}/vala/vapi/spice-protocol.vapi
This page took 0.093808 seconds and 4 git commands to generate.