]>
Commit | Line | Data |
---|---|---|
ea70cf2b JR |
1 | # |
2 | # Conditional build: | |
cf859d29 JB |
3 | %bcond_with gtk2 # use GTK+ 2.x instead of GTK+ 3.x |
4 | %bcond_without spice # SPICE support | |
5 | %bcond_without plugin # Mozilla plugin (doesn't work with GTK+ 3) | |
ea70cf2b | 6 | # |
cf859d29 JB |
7 | %if %{without gtk2} |
8 | %undefine with_plugin | |
9 | %endif | |
ea70cf2b | 10 | Summary: Virtual Machine Viewer |
cf859d29 | 11 | Summary(pl.UTF-8): Przeglądarka maszyny wirtualnej |
ea70cf2b | 12 | Name: virt-viewer |
a77aecb4 | 13 | Version: 0.5.2 |
ea70cf2b JR |
14 | Release: 1 |
15 | License: GPL v2+ | |
16 | Group: X11/Applications/Networking | |
17 | Source0: http://virt-manager.org/download/sources/virt-viewer/%{name}-%{version}.tar.gz | |
a77aecb4 | 18 | # Source0-md5: 4a8e1c4d69cff00d89a13efb26ec1050 |
cf859d29 | 19 | Patch0: %{name}-plugin.patch |
ea70cf2b | 20 | URL: http://virt-manager.org/ |
cf859d29 | 21 | BuildRequires: autoconf >= 2.50 |
7dbcbbfc JR |
22 | BuildRequires: automake |
23 | BuildRequires: gettext-devel >= 0.14.1 | |
cf859d29 | 24 | BuildRequires: glib2-devel >= 1:2.12.0 |
7dbcbbfc | 25 | BuildRequires: intltool >= 0.35.0 |
cf859d29 JB |
26 | BuildRequires: libtool |
27 | BuildRequires: libvirt-devel >= 0.9.7 | |
28 | BuildRequires: libxml2-devel >= 1:2.6.0 | |
29 | BuildRequires: perl-tools-pod | |
30 | BuildRequires: sed >= 4.0 | |
31 | BuildRequires: spice-protocol >= 0.10.1 | |
32 | %if %{with gtk2} | |
33 | BuildRequires: gtk+2-devel >= 2:2.18.0 | |
34 | BuildRequires: gtk-vnc-devel >= 0.4.3 | |
35 | %{?with_spice:BuildRequires: spice-gtk2-devel >= 0.11} | |
36 | %else | |
ea70cf2b JR |
37 | BuildRequires: gtk+3-devel >= 3.0.0 |
38 | BuildRequires: gtk3-vnc-devel >= 0.4.3 | |
a77aecb4 | 39 | %{?with_spice:BuildRequires: spice-gtk-devel >= 0.11} |
7dbcbbfc | 40 | %endif |
cf859d29 JB |
41 | %if %{with plugin} |
42 | BuildRequires: nspr-devel >= 4.0.0 | |
43 | BuildRequires: xulrunner-devel >= 1.8 | |
ea70cf2b | 44 | %endif |
7dbcbbfc | 45 | Requires(post,postun): gtk-update-icon-cache |
cf859d29 | 46 | Requires: glib2 >= 1:2.12.0 |
7dbcbbfc | 47 | Requires: hicolor-icon-theme |
cf859d29 JB |
48 | Requires: libvirt >= 0.9.7 |
49 | Requires: libxml2 >= 1:2.6.0 | |
50 | %if %{with gtk2} | |
51 | Requires: gtk+2 >= 2:2.18.0 | |
52 | Requires: gtk-vnc >= 0.4.3 | |
53 | %{?with_spice:Requires: spice-gtk2 >= 0.11} | |
54 | %else | |
55 | BuildRequires: gtk+3 >= 3.0.0 | |
56 | BuildRequires: gtk3-vnc >= 0.4.3 | |
57 | %{?with_spice:BuildRequires: spice-gtk >= 0.11} | |
58 | %endif | |
ea70cf2b JR |
59 | Suggests: openssh-clients |
60 | Suggests: gnome-keyring >= 0.4.9 | |
cf859d29 | 61 | ExclusiveArch: %{ix86} %{x8664} ia64 |
ea70cf2b JR |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
64 | %description | |
65 | Virtual Machine Viewer provides a graphical console client for | |
66 | connecting to virtual machines. It uses the GTK-VNC or SPICE-GTK | |
67 | widgets to provide the display, and libvirt for looking up VNC/SPICE | |
68 | server details. | |
69 | ||
cf859d29 JB |
70 | %description -l pl.UTF-8 |
71 | Virtual Machine Viewer udostępnia klienta graficznej konsoli do | |
72 | łączenia z maszynami wirtualnymi. Wykorzystuje widgety GTK-VNC lub | |
73 | SPICE-GTK do zapewnienia obrazu oraz libvirt do odczytu szczegółów | |
74 | serwera VNC/SPICE. | |
ea70cf2b JR |
75 | |
76 | %package plugin | |
77 | Summary: Mozilla plugin for the gtk-vnc library | |
cf859d29 | 78 | Summary(pl.UTF-8): Wtyczka Mozilli do biblioteki gtk-vnc |
ea70cf2b JR |
79 | Group: Development/Libraries |
80 | Requires: %{name} = %{version}-%{release} | |
81 | ||
82 | %description plugin | |
83 | Virtual Machine Viewer provides a graphical | |
84 | console client for connecting to virtual machines. It uses the GTK-VNC | |
85 | or SPICE-GTK widgets to provide the display, and libvirt for looking | |
86 | up VNC/SPICE server details. | |
87 | ||
88 | This package provides a web browser plugin for Mozilla compatible | |
89 | browsers. | |
90 | ||
cf859d29 JB |
91 | %description plugin -l pl.UTF-8 |
92 | Virtual Machine Viewer udostępnia klienta graficznej konsoli do | |
93 | łączenia z maszynami wirtualnymi. Wykorzystuje widgety GTK-VNC lub | |
94 | SPICE-GTK do zapewnienia obrazu oraz libvirt do odczytu szczegółów | |
95 | serwera VNC/SPICE. | |
96 | ||
97 | Ten pakiet dostarcza wtyczkę dla przeglądarek WWW zgodnych z Mozillą. | |
98 | ||
ea70cf2b JR |
99 | %prep |
100 | %setup -q | |
cf859d29 | 101 | %patch0 -p1 |
ea70cf2b | 102 | |
7dbcbbfc JR |
103 | %{__sed} -i -e 's|PWD|shell pwd|g' icons/*/Makefile.am |
104 | ||
ea70cf2b | 105 | %build |
7dbcbbfc JR |
106 | %{__libtoolize} |
107 | %{__aclocal} | |
108 | %{__autoconf} | |
cf859d29 | 109 | %{__autoheader} |
7dbcbbfc | 110 | %{__automake} |
ea70cf2b | 111 | %configure \ |
cf859d29 | 112 | --disable-silent-rules \ |
ea70cf2b JR |
113 | %{__enable_disable plugin} \ |
114 | %{__with_without spice spice-gtk} \ | |
cf859d29 | 115 | --with-gtk=%{?with_gtk2:2.0}%{!?with_gtk2:3.0} |
ea70cf2b JR |
116 | |
117 | %{__make} | |
118 | ||
119 | %install | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %{__make} install \ | |
cf859d29 JB |
123 | DESTDIR=$RPM_BUILD_ROOT \ |
124 | plugindir=%{_libdir}/browser-plugins | |
ea70cf2b JR |
125 | |
126 | %find_lang %{name} | |
127 | ||
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
7dbcbbfc JR |
131 | %post |
132 | %update_icon_cache hicolor | |
133 | ||
134 | %postun | |
135 | %update_icon_cache hicolor | |
136 | ||
ea70cf2b JR |
137 | %files -f %{name}.lang |
138 | %defattr(644,root,root,755) | |
139 | %doc AUTHORS ChangeLog NEWS README | |
7dbcbbfc JR |
140 | %attr(755,root,root) %{_bindir}/virt-viewer |
141 | %attr(755,root,root) %{_bindir}/remote-viewer | |
ea70cf2b JR |
142 | %dir %{_datadir}/%{name} |
143 | %dir %{_datadir}/%{name}/ui | |
144 | %{_datadir}/%{name}/ui/*.xml | |
7dbcbbfc JR |
145 | %{_iconsdir}/hicolor/*/apps/virt-viewer.png |
146 | %{_mandir}/man1/virt-viewer.1* | |
147 | %{_mandir}/man1/remote-viewer.1* | |
ea70cf2b JR |
148 | |
149 | %if %{with plugin} | |
150 | %files plugin | |
151 | %defattr(644,root,root,755) | |
cf859d29 | 152 | %attr(755,root,root) %{_libdir}/browser-plugins/virt-viewer-plugin.so |
ea70cf2b | 153 | %endif |