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://releases.pagure.org/virt-viewer/%{name}-%{version}.tar.xz
14 # Source0-md5: 06b80228aaf10e614aeb8ffa4814b03a
16 Patch1: %{name}-rest1.patch
17 URL: https://virt-manager.org/
18 BuildRequires: bash-completion-devel >= 1:2.0
19 BuildRequires: gettext-tools >= 0.14.1
20 BuildRequires: glib2-devel >= 1:2.48
21 BuildRequires: gtk+3-devel >= 3.18
22 BuildRequires: gtk3-vnc-devel >= 0.4.3
23 BuildRequires: icoutils
24 %{?with_ovirt:BuildRequires: libgovirt-devel >= 0.3.9}
25 BuildRequires: libvirt-devel >= 1.2.8
26 BuildRequires: libvirt-glib-devel >= 0.1.8
27 BuildRequires: libxml2-devel >= 1:2.6.0
28 BuildRequires: meson >= 0.54.0
29 BuildRequires: ninja >= 1.5
30 BuildRequires: perl-tools-pod
31 BuildRequires: pkgconfig
32 BuildRequires: python3 >= 1:3
33 %{?with_ovirt:BuildRequires: rest1-devel >= 0.9.1-2}
34 BuildRequires: rpm-build >= 4.6
35 BuildRequires: rpmbuild(macros) >= 2.000
36 BuildRequires: sed >= 4.0
37 %{?with_spice:BuildRequires: spice-gtk-devel >= 0.41}
38 BuildRequires: spice-protocol >= 0.12.7
39 BuildRequires: tar >= 1:1.22
40 BuildRequires: vte-devel >= 0.46.0
42 Requires(post,postun): desktop-file-utils
43 Requires(post,postun): gtk-update-icon-cache
44 Requires(post,postun): shared-mime-info
45 Requires: glib2 >= 1:2.48
46 Requires: gtk+3 >= 3.18
47 Requires: gtk3-vnc >= 0.4.3
48 Requires: hicolor-icon-theme
49 %{?with_ovirt:Requires: libgovirt >= 0.3.9}
50 Requires: libvirt >= 1.2.8
51 Requires: libvirt-glib >= 0.1.8
52 Requires: libxml2 >= 1:2.6.0
53 %{?with_ovirt:Requires: rest1 >= 0.9.1-2}
54 %{?with_spice:Requires: spice-gtk >= 0.41}
55 Requires: vte >= 0.46.0
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 < 0.12.6}
60 Obsoletes: virt-viewer-plugin < 0.5.6
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.
96 %{!?with_ovirt:-Dovirt=disabled} \
97 %{?with_ovirt:-Dovirt=enabled} \
98 %{!?with_spice:-Dspice=disabled} \
99 %{?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