diff --git a/sources b/sources index c39c76b..9311ebe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4fc003cb655aa45b77c9f2ee45ba6d4f virt-viewer-0.4.2.tar.gz +cf1c62a3dd25b5904f86f4542f80a6f8 virt-viewer-0.5.0.tar.gz diff --git a/virt-viewer.spec b/virt-viewer.spec index 36fc9fa..8b28c2a 100644 --- a/virt-viewer.spec +++ b/virt-viewer.spec @@ -20,8 +20,8 @@ %endif Name: virt-viewer -Version: 0.4.2 -Release: 2%{?dist}%{?extra_release} +Version: 0.5.0 +Release: 1%{?dist}%{?extra_release} Summary: Virtual Machine Viewer Group: Applications/System License: GPLv2+ @@ -29,6 +29,8 @@ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: openssh-clients +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives %if %{with_gtk3} BuildRequires: gtk3-devel >= 3.0.0 @@ -44,9 +46,9 @@ BuildRequires: gtk-vnc-devel >= 0.4.3 %endif %if %{with_spice} %if %{with_gtk3} -BuildRequires: spice-gtk3-devel >= 0.6 +BuildRequires: spice-gtk3-devel >= 0.9 %else -BuildRequires: spice-gtk-devel >= 0.6 +BuildRequires: spice-gtk-devel >= 0.9 %endif %endif BuildRequires: /usr/bin/pod2man @@ -109,6 +111,9 @@ browsers. %install rm -rf $RPM_BUILD_ROOT %__make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p %{buildroot}%{_libexecdir} +touch %{buildroot}%{_libexecdir}/spice-xpi-client +install -m 0755 data/spice-xpi-client-remote-viewer %{buildroot}%{_libexecdir}/ %if %{_with_plugin} rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.a rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.la @@ -118,16 +123,36 @@ rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.la %clean rm -rf $RPM_BUILD_ROOT +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +%{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \ + spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 20 + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %{_sbindir}/update-alternatives --remove spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer +fi + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files -f %{name}.lang %defattr(-,root,root,-) %doc README COPYING AUTHORS ChangeLog NEWS %{_bindir}/%{name} +%{_bindir}/remote-viewer %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/ui/ %{_datadir}/%{name}/ui/virt-viewer.xml %{_datadir}/%{name}/ui/virt-viewer-auth.xml %{_datadir}/%{name}/ui/virt-viewer-about.xml -%{_mandir}/man1/%{name}* +%{_datadir}/icons/hicolor/*/apps/* +%ghost %{_libexecdir}/spice-xpi-client +%{_libexecdir}/spice-xpi-client-remote-viewer +%{_mandir}/man1/virt-viewer.1* +%{_mandir}/man1/remote-viewer.1* %if %{_with_plugin} %files plugin