2007-07-20 15:26:08 -04:00
# -*- rpm-spec -*-
2012-10-12 11:35:36 +01:00
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
2017-03-14 16:03:54 -03:00
%{!?enable_autotools:%global enable_autotools 0}
2012-10-12 11:35:36 +01:00
2011-02-11 15:55:49 +00:00
%define with_spice 0
2013-09-13 14:08:18 +02:00
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
2011-02-11 15:55:49 +00:00
%define with_spice 1
%endif
2013-02-21 18:10:48 +01:00
%define with_govirt 0
2013-12-13 15:56:57 +01:00
%if 0%{?fedora} > 19 || 0%{?rhel} >= 7
2013-05-01 17:40:06 +01:00
%define with_govirt 1
%endif
2013-02-21 18:10:48 +01:00
2007-07-20 15:26:08 -04:00
Name : @PACKAGE@
Version : @VERSION@
2007-08-15 20:14:44 -04:00
Release : 1%{?dist} %{?extra_release}
2007-07-20 15:26:08 -04:00
Summary : Virtual Machine Viewer
2007-08-15 20:18:51 -04:00
Group : Applications/System
2008-03-07 12:53:56 -05:00
License : GPLv2+
2007-07-20 15:26:08 -04:00
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)
2008-03-07 12:53:56 -05:00
Requires : openssh-clients
2012-02-06 14:22:42 +00:00
Requires(post) : %{_sbindir} /update-alternatives
Requires(postun) : %{_sbindir} /update-alternatives
2012-04-18 14:12:57 +01:00
Requires(post) : desktop-file-utils
Requires(postun) : desktop-file-utils
2007-07-20 15:26:08 -04:00
2012-10-12 11:35:36 +01:00
%if 0%{?enable_autotools}
BuildRequires : autoconf
BuildRequires : automake
BuildRequires : gettext-devel
BuildRequires : libtool
%endif
2016-04-15 10:29:06 +02:00
BuildRequires : pkgconfig(glib-2.0) >= @GLIB2_REQUIRED@
BuildRequires : pkgconfig(gtk+-3.0) >= @GTK_REQUIRED@
BuildRequires : pkgconfig(libvirt) >= @LIBVIRT_REQUIRED@
BuildRequires : pkgconfig(libvirt-glib-1.0) >= @LIBVIRT_GLIB_REQUIRED@
BuildRequires : pkgconfig(libxml-2.0) >= @LIBXML2_REQUIRED@
BuildRequires : pkgconfig(gtk-vnc-2.0) >= @GTK_VNC_REQUIRED@
2011-02-11 15:55:49 +00:00
%if %{with_spice}
2016-04-15 10:29:06 +02:00
BuildRequires : pkgconfig(spice-client-gtk-3.0) >= @SPICE_GTK_REQUIRED@
BuildRequires : pkgconfig(spice-protocol) >= @SPICE_PROTOCOL_REQUIRED@
2011-07-12 13:10:40 +01:00
%endif
2007-07-20 15:59:19 -04:00
BuildRequires : /usr/bin/pod2man
2011-02-21 12:38:45 +00:00
BuildRequires : intltool
2013-05-01 17:40:06 +01:00
%if %{with_govirt}
2016-04-15 10:29:06 +02:00
BuildRequires : pkgconfig(govirt-1.0) >= @GOVIRT_REQUIRED@
2013-05-01 17:40:06 +01:00
%endif
2007-07-20 15:26:08 -04:00
2013-06-04 18:26:13 +02:00
%if 0%{?fedora} >= 20
2013-05-23 15:45:40 +02:00
Obsoletes : spice-client < 0.12.3-2
%endif
2007-07-20 15:26:08 -04:00
%description
Virtual Machine Viewer provides a graphical console client for connecting
2011-07-01 11:18:36 +01:00
to virtual machines. It uses the GTK-VNC or SPICE-GTK widgets to provide
the display, and libvirt for looking up VNC/SPICE server details.
2007-07-20 15:26:08 -04:00
%prep
%setup -q
%build
2011-02-11 15:55:49 +00:00
2012-10-12 11:35:36 +01:00
%if 0%{?enable_autotools}
autoreconf -if
%endif
2011-02-11 15:55:49 +00:00
%if %{with_spice}
2011-11-03 20:37:48 +00:00
%define spice_arg --with-spice-gtk
2011-02-11 15:55:49 +00:00
%else
2011-11-03 20:37:48 +00:00
%define spice_arg --without-spice-gtk
2011-02-11 15:55:49 +00:00
%endif
2013-02-21 18:10:48 +01:00
%if %{with_govirt}
%define govirt_arg --with-ovirt
%endif
2017-03-14 16:03:54 -03:00
%configure %{spice_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
2008-03-09 16:36:17 -04:00
%__make %{?_smp_mflags}
2007-07-20 15:26:08 -04:00
%install
rm -rf $RPM_BUILD_ROOT
2008-03-07 12:53:56 -05:00
%__make install DESTDIR=$RPM_BUILD_ROOT
2010-01-11 17:00:37 +00:00
%find_lang %{name}
2007-07-20 15:26:08 -04:00
%clean
rm -rf $RPM_BUILD_ROOT
2012-02-06 14:22:42 +00:00
%post
2017-03-14 16:03:54 -03:00
%{_bindir} /touch --no-create %{_datadir} /icons/hicolor &>/dev/null || :
%{_bindir} /touch --no-create %{_datadir} /mime/packages &> /dev/null || :
%{_bindir} /update-desktop-database -q %{_datadir} /applications
2012-02-06 14:22:42 +00:00
%postun
if [ $1 -eq 0 ] ; then
2017-03-14 16:03:54 -03:00
%{_bindir} /touch --no-create %{_datadir} /icons/hicolor &>/dev/null
%{_bindir} /gtk-update-icon-cache %{_datadir} /icons/hicolor &>/dev/null || :
%{_bindir} /update-mime-database %{_datadir} /mime &> /dev/null
2012-02-06 14:22:42 +00:00
fi
2017-03-14 16:03:54 -03:00
%{_bindir} /update-desktop-database -q %{_datadir} /applications
2012-02-06 14:22:42 +00:00
2012-02-08 16:41:37 +00:00
%posttrans
2017-03-14 16:03:54 -03:00
%{_bindir} /gtk-update-icon-cache %{_datadir} /icons/hicolor &>/dev/null || :
%{_bindir} /update-mime-database %{?fedora:-n} %{_datadir} /mime &> /dev/null || :
2012-02-08 16:41:37 +00:00
2010-01-11 17:00:37 +00:00
%files -f %{name}.lang
2007-07-20 15:26:08 -04:00
%defattr (-,root,root,-)
2017-02-07 16:31:42 +01:00
%doc README.md COPYING AUTHORS ChangeLog NEWS
2007-07-20 15:26:08 -04:00
%{_bindir} /%{name}
2012-01-27 14:51:23 +01:00
%{_bindir} /remote-viewer
2012-02-08 16:41:37 +00:00
%{_datadir} /icons/hicolor/*/apps/*
2014-03-12 22:35:25 +01:00
%{_datadir} /icons/hicolor/*/devices/*
2012-04-18 14:12:57 +01:00
%{_datadir} /applications/remote-viewer.desktop
2016-06-27 17:20:54 +02:00
%{_datadir} /appdata/remote-viewer.appdata.xml
2013-02-12 18:59:04 +01:00
%{_datadir} /mime/packages/virt-viewer-mime.xml
2012-02-06 14:04:45 +00:00
%{_mandir} /man1/virt-viewer.1*
%{_mandir} /man1/remote-viewer.1*
2007-07-20 15:26:08 -04:00
%changelog