]> git.pld-linux.org Git - packages/spice-gtk.git/blob - spice-gtk.spec
- release 2 (by relup.sh)
[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:        2
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:  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
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:       spice-glib-devel = %{version}-%{release}
82 Requires:       gtk+3-devel >= 3.0
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:       spice-glib = %{version}-%{release}
176 Requires:       polkit >= 0.96
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
242 %description -n vala-spice-protocol
243 Vala API for SPICE client library.
244
245 %description -n vala-spice-protocol -l pl.UTF-8
246 Interfejs języka Vala do biblioteki klienckiej SPICE.
247
248 %prep
249 %setup -q
250 %patch0 -p1
251 %patch1 -p1
252 %patch2 -p1
253
254 mkdir %{?with_gtk2:gtk2} %{?with_gtk3:gtk3}
255
256 %build
257 %{__intltoolize}
258 %{__libtoolize}
259 %{__aclocal} -I m4
260 %{__autoconf}
261 %{__autoheader}
262 %{__automake}
263 cd spice-common
264 %{__aclocal} -I m4
265 %{__autoconf}
266 %{__autoheader}
267 %{__automake}
268 cd ..
269
270 %if %{with gtk2}
271 cd gtk2
272 ../%configure \
273         --enable-lz4 \
274         --disable-silent-rules \
275         %{!?with_smartcard:--disable-smartcard} \
276         %{?with_static_libs:--enable-static} \
277         %{!?with_usbredir:--disable-usbredir} \
278         --with-gtk=2.0 \
279         --with-html-dir=%{_gtkdocdir} \
280         --with-pnp-ids-path=/lib/hwdata/pnp.ids \
281         --with-usb-ids-path=/lib/hwdata/usb.ids
282 %{__make}
283 cd ..
284 %endif
285
286 %if %{with gtk3}
287 cd gtk3
288 ../%configure \
289         --enable-gtk-doc \
290         --enable-lz4 \
291         --disable-silent-rules \
292         %{!?with_smartcard:--disable-smartcard} \
293         %{?with_static_libs:--enable-static} \
294         %{!?with_usbredir:--disable-usbredir} \
295         --with-gtk=3.0 \
296         --with-html-dir=%{_gtkdocdir} \
297         --with-pnp-ids-path=/lib/hwdata/pnp.ids \
298         --with-usb-ids-path=/lib/hwdata/usb.ids
299 %{__make}
300 %endif
301
302 %install
303 rm -rf $RPM_BUILD_ROOT
304
305 # gtk2 first, so executables will use gtk3 libs
306 %if %{with gtk2}
307 %{__make} -C gtk2 install -j1 \
308         DESTDIR=$RPM_BUILD_ROOT
309 %endif
310
311 %if %{with gtk3}
312 %{__make} -C gtk3 install -j1 \
313         DESTDIR=$RPM_BUILD_ROOT
314 %endif
315
316 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.la
317 %if %{with static_libs}
318 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/SpiceClientGtk.a
319 %endif
320 # obsoleted by pkg-config
321 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
322
323 %find_lang %{name}
324
325 %clean
326 rm -rf $RPM_BUILD_ROOT
327
328 %post   -p /sbin/ldconfig
329 %postun -p /sbin/ldconfig
330
331 %post   -n spice-glib -p /sbin/ldconfig
332 %postun -n spice-glib -p /sbin/ldconfig
333
334 %post   -n spice-gtk2 -p /sbin/ldconfig
335 %postun -n spice-gtk2 -p /sbin/ldconfig
336
337 %if %{with gtk3}
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*
348
349 %files devel
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
355
356 %if %{with static_libs}
357 %files static
358 %defattr(644,root,root,755)
359 %{_libdir}/libspice-client-gtk-3.0.a
360 %endif
361
362 %files apidocs
363 %defattr(644,root,root,755)
364 %{_gtkdocdir}/spice-gtk
365 %endif
366
367 %files -n spice-glib
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
374
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
384
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
390 %endif
391
392 %if %{with usbredir}
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
397 %endif
398
399 %if %{with gtk2}
400 %files -n spice-gtk2
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
405
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
412
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
417 %endif
418
419 %files -n python-spice-gtk
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{py_sitedir}/SpiceClientGtk.so
422 %endif
423
424 %files -n vala-spice-protocol
425 %defattr(644,root,root,755)
426 %{_datadir}/vala/vapi/spice-protocol.vapi
This page took 0.103909 seconds and 4 git commands to generate.