3 %bcond_without spice # SPICE support
4 %bcond_without ovirt # oVirt support
6 Summary: Virtual Machine Viewer
7 Summary(pl.UTF-8): Przeglądarka maszyny wirtualnej
12 Group: X11/Applications/Networking
13 Source0: https://virt-manager.org/download/sources/virt-viewer/%{name}-%{version}.tar.xz
14 # Source0-md5: 06b80228aaf10e614aeb8ffa4814b03a
16 URL: http://virt-manager.org/
17 BuildRequires: bash-completion-devel
19 BuildRequires: gettext-tools >= 0.14.1
20 BuildRequires: glib2-devel >= 1:2.40.0
21 BuildRequires: gtk+3-devel >= 3.12
22 BuildRequires: gtk3-vnc-devel >= 0.4.3
23 BuildRequires: icoutils
24 BuildRequires: intltool >= 0.35.0
25 %{?with_ovirt:BuildRequires: libgovirt-devel >= 0.3.7}
26 BuildRequires: libtool >= 2:2
27 BuildRequires: libvirt-devel >= 1.2.8
28 BuildRequires: libvirt-glib-devel >= 0.1.8
29 BuildRequires: libxml2-devel >= 1:2.6.0
32 BuildRequires: perl-tools-pod
33 BuildRequires: pkgconfig
34 %{?with_ovirt:BuildRequires: rest-devel >= 0.8}
35 BuildRequires: rpm-build >= 4.6
36 BuildRequires: rpmbuild(macros) >= 2.000
37 BuildRequires: sed >= 4.0
38 %{?with_spice:BuildRequires: spice-gtk-devel >= 0.35}
39 BuildRequires: spice-protocol >= 0.12.7
40 BuildRequires: tar >= 1:1.22
41 BuildRequires: vte-devel
43 Requires(post,postun): desktop-file-utils
44 Requires(post,postun): gtk-update-icon-cache
45 Requires(post,postun): shared-mime-info
46 Requires: glib2 >= 1:2.40.0
47 Requires: gtk+3 >= 3.12
48 Requires: gtk3-vnc >= 0.4.3
49 Requires: hicolor-icon-theme
50 %{?with_ovirt:Requires: libgovirt >= 0.3.3}
51 Requires: libvirt >= 1.2.8
52 Requires: libvirt-glib >= 0.1.8
53 Requires: libxml2 >= 1:2.6.0
54 %{?with_ovirt:Requires: rest >= 0.8}
55 %{?with_spice:Requires: spice-gtk >= 0.35}
56 Suggests: gnome-keyring >= 0.4.9
57 Suggests: openssh-clients
58 # let it obsolete withdrawn spice client from spice-space package
59 %{?with_spice:Obsoletes: spice-client}
60 Obsoletes: virt-viewer-plugin
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 Virtual Machine Viewer provides a graphical console client for
65 connecting to virtual machines. It uses the GTK-VNC or SPICE-GTK
66 widgets to provide the display, and libvirt for looking up VNC/SPICE
69 %description -l pl.UTF-8
70 Virtual Machine Viewer udostępnia klienta graficznej konsoli do
71 łączenia z maszynami wirtualnymi. Wykorzystuje widgety GTK-VNC lub
72 SPICE-GTK do zapewnienia obrazu oraz libvirt do odczytu szczegółów
75 %package -n bash-completion-virt-viewer
76 Summary: bash-completion for virt-viewer command
77 Summary(pl.UTF-8): bashowe uzupełnianie parametrów polecenia virt-viewer
78 Group: Applications/Shells
79 Requires: %{name} = %{version}-%{release}
80 Requires: bash-completion >= 1:2.0
83 %description -n bash-completion-virt-viewer
84 Bash-completion for virt-viewer command.
86 %description -n bash-completion-virt-viewer -l pl.UTF-8
87 Bashowe uzupełnianie parametrów polecenia virt-viewer.
95 %{!?with_ovirt:-Dovirt=disabled} \
96 %{?with_ovirt:-Dovirt=enabled} \
97 %{!?with_spice:-Dspice=disabled} \
98 %{?with_spice:-Dspice=enabled} \
101 %ninja_build -C build
104 rm -rf $RPM_BUILD_ROOT
106 %ninja_install -C build
111 rm -rf $RPM_BUILD_ROOT
114 %update_desktop_database_post
115 %update_icon_cache hicolor
116 %update_mime_database
119 %update_desktop_database_postun
120 %update_icon_cache hicolor
121 %update_mime_database
123 %files -f %{name}.lang
124 %defattr(644,root,root,755)
125 %doc AUTHORS NEWS README.md
126 %attr(755,root,root) %{_bindir}/virt-viewer
127 %attr(755,root,root) %{_bindir}/remote-viewer
128 %{_datadir}/metainfo/remote-viewer.appdata.xml
129 %{_datadir}/mime/packages/virt-viewer-mime.xml
130 %{_desktopdir}/remote-viewer.desktop
131 %{_iconsdir}/hicolor/*/apps/virt-viewer.png
132 %{_iconsdir}/hicolor/scalable/apps/virt-viewer.svg
133 %{_mandir}/man1/virt-viewer.1*
134 %{_mandir}/man1/remote-viewer.1*
136 %files -n bash-completion-virt-viewer
137 %defattr(644,root,root,755)
138 %{bash_compdir}/virt-viewer