2006-03-29 19:40:14 +08:00
|
|
|
# -*- rpm-spec -*-
|
|
|
|
|
2011-03-29 21:36:07 +08:00
|
|
|
|
2013-04-17 04:42:25 +08:00
|
|
|
%define with_guestfs 0
|
2014-01-21 00:09:13 +08:00
|
|
|
%define stable_defaults 0
|
2013-04-17 04:42:25 +08:00
|
|
|
%define askpass_package "openssh-askpass"
|
|
|
|
%define qemu_user "qemu"
|
2013-05-28 06:38:08 +08:00
|
|
|
%define libvirt_packages "libvirt-daemon-kvm,libvirt-daemon-config-network"
|
2013-04-17 04:42:25 +08:00
|
|
|
%define preferred_distros "fedora,rhel"
|
|
|
|
%define kvm_packages "qemu-system-x86"
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%define preferred_distros "rhel,fedora"
|
|
|
|
%define kvm_packages "qemu-kvm"
|
2014-01-21 00:09:13 +08:00
|
|
|
%define stable_defaults 1
|
2012-07-10 04:07:32 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2013-04-17 04:42:25 +08:00
|
|
|
# End local config
|
2011-08-02 00:08:08 +08:00
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
Name: virt-manager
|
2014-03-07 22:57:04 +08:00
|
|
|
Version: @VERSION@
|
2015-02-23 00:32:02 +08:00
|
|
|
Release: 1%{?dist}
|
2011-07-14 06:00:28 +08:00
|
|
|
%define verrel %{version}-%{release}
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2011-07-14 06:00:28 +08:00
|
|
|
Summary: Virtual Machine Manager
|
2006-03-29 19:40:14 +08:00
|
|
|
Group: Applications/Emulators
|
2007-11-21 00:12:20 +08:00
|
|
|
License: GPLv2+
|
2008-09-11 06:51:18 +08:00
|
|
|
URL: http://virt-manager.org/
|
|
|
|
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
2009-07-22 23:16:06 +08:00
|
|
|
BuildArch: noarch
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-03-18 07:32:19 +08:00
|
|
|
|
2013-05-10 06:32:30 +08:00
|
|
|
Requires: virt-manager-common = %{verrel}
|
2012-05-14 21:24:56 +08:00
|
|
|
Requires: pygobject3
|
|
|
|
Requires: gtk3
|
2013-04-17 16:38:34 +08:00
|
|
|
Requires: libvirt-glib >= 0.0.9
|
2013-04-17 04:42:25 +08:00
|
|
|
Requires: libxml2-python
|
2013-05-10 06:24:09 +08:00
|
|
|
Requires: vte3
|
2013-10-05 04:34:19 +08:00
|
|
|
Requires: dconf
|
2013-12-15 00:43:19 +08:00
|
|
|
Requires: dbus-x11
|
2013-04-17 04:42:25 +08:00
|
|
|
|
2007-07-07 05:46:50 +08:00
|
|
|
# For console widget
|
2012-05-14 21:24:56 +08:00
|
|
|
Requires: gtk-vnc2
|
|
|
|
Requires: spice-gtk3
|
2015-03-31 00:47:39 +08:00
|
|
|
|
|
|
|
%if 0%{?rhel} == 7
|
2014-10-01 17:49:52 +08:00
|
|
|
Requires: gnome-icon-theme
|
2015-03-31 00:47:39 +08:00
|
|
|
%endif
|
2013-04-17 04:42:25 +08:00
|
|
|
|
|
|
|
|
2015-02-22 23:01:43 +08:00
|
|
|
BuildRequires: python
|
2007-05-19 00:14:33 +08:00
|
|
|
BuildRequires: intltool
|
2013-03-02 01:40:48 +08:00
|
|
|
BuildRequires: /usr/bin/pod2man
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-04-17 04:42:25 +08:00
|
|
|
|
2006-03-29 19:40:14 +08:00
|
|
|
%description
|
2008-09-10 23:18:06 +08:00
|
|
|
Virtual Machine Manager provides a graphical tool for administering virtual
|
2013-09-24 08:40:43 +08:00
|
|
|
machines for KVM, Xen, and LXC. Start, stop, add or remove virtual devices,
|
2008-09-10 23:18:06 +08:00
|
|
|
connect to a graphical or serial console, and see resource usage statistics
|
|
|
|
for existing VMs on local or remote machines. Uses libvirt as the backend
|
|
|
|
management API.
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-03-18 07:32:19 +08:00
|
|
|
|
|
|
|
%package common
|
|
|
|
Summary: Common files used by the different Virtual Machine Manager interfaces
|
|
|
|
Group: Applications/Emulators
|
|
|
|
|
|
|
|
# This version not strictly required: virt-manager should work with older,
|
|
|
|
# however varying amounts of functionality will not be enabled.
|
|
|
|
Requires: libvirt-python >= 0.7.0
|
|
|
|
Requires: libxml2-python
|
|
|
|
Requires: python-urlgrabber
|
2013-04-18 05:39:25 +08:00
|
|
|
Requires: python-ipaddr
|
2014-11-01 03:09:54 +08:00
|
|
|
Requires: libosinfo >= 0.2.10
|
2015-02-25 00:23:46 +08:00
|
|
|
# Required for gobject-introspection infrastructure
|
|
|
|
Requires: pygobject3-base
|
2013-03-18 07:32:19 +08:00
|
|
|
|
|
|
|
%description common
|
|
|
|
Common files used by the different virt-manager interfaces, as well as
|
|
|
|
virt-install related tools.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n virt-install
|
|
|
|
Summary: Utilities for installing virtual machines
|
|
|
|
|
|
|
|
Requires: virt-manager-common = %{verrel}
|
|
|
|
|
|
|
|
Provides: virt-install
|
|
|
|
Provides: virt-clone
|
|
|
|
Provides: virt-convert
|
2014-01-19 23:37:14 +08:00
|
|
|
Provides: virt-xml
|
2013-03-18 07:32:19 +08:00
|
|
|
Obsoletes: python-virtinst
|
|
|
|
|
|
|
|
%description -n virt-install
|
|
|
|
Package includes several command line utilities, including virt-install
|
|
|
|
(build and install new VMs) and virt-clone (clone an existing virtual
|
|
|
|
machine).
|
|
|
|
|
|
|
|
|
2006-03-29 19:40:14 +08:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2011-03-29 21:36:07 +08:00
|
|
|
%if %{qemu_user}
|
2013-03-17 09:32:29 +08:00
|
|
|
%define _qemu_user --qemu-user=%{qemu_user}
|
2011-03-29 21:36:07 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{kvm_packages}
|
2013-03-17 09:32:29 +08:00
|
|
|
%define _kvm_packages --kvm-package-names=%{kvm_packages}
|
2011-03-29 21:36:07 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{preferred_distros}
|
2013-03-17 09:32:29 +08:00
|
|
|
%define _preferred_distros --preferred-distros=%{preferred_distros}
|
2011-03-29 21:36:07 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{libvirt_packages}
|
2013-03-17 09:32:29 +08:00
|
|
|
%define _libvirt_packages --libvirt-package-names=%{libvirt_packages}
|
2011-03-29 21:36:07 +08:00
|
|
|
%endif
|
|
|
|
|
2012-07-09 07:42:06 +08:00
|
|
|
%if %{askpass_package}
|
2013-03-17 09:32:29 +08:00
|
|
|
%define _askpass_package --askpass-package-names=%{askpass_package}
|
2012-07-09 07:42:06 +08:00
|
|
|
%endif
|
|
|
|
|
2014-01-21 00:09:13 +08:00
|
|
|
%if %{stable_defaults}
|
|
|
|
%define _stable_defaults --stable-defaults
|
2011-03-29 21:36:07 +08:00
|
|
|
%endif
|
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
python setup.py configure \
|
|
|
|
%{?_qemu_user} \
|
|
|
|
%{?_kvm_packages} \
|
|
|
|
%{?_libvirt_packages} \
|
|
|
|
%{?_askpass_package} \
|
|
|
|
%{?_preferred_distros} \
|
2014-01-21 00:09:13 +08:00
|
|
|
%{?_stable_defaults}
|
2006-03-29 19:40:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
2013-03-17 09:32:29 +08:00
|
|
|
python setup.py install -O1 --root=$RPM_BUILD_ROOT
|
|
|
|
|
2006-08-09 00:02:00 +08:00
|
|
|
%find_lang %{name}
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
|
2006-09-02 04:33:32 +08:00
|
|
|
%post
|
2011-08-03 01:19:58 +08:00
|
|
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
2013-04-18 05:39:25 +08:00
|
|
|
/usr/bin/update-desktop-database &> /dev/null || :
|
2007-03-03 05:24:35 +08:00
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
|
2006-09-02 04:33:32 +08:00
|
|
|
%postun
|
2011-08-03 01:19:58 +08:00
|
|
|
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 || :
|
2013-04-18 05:39:25 +08:00
|
|
|
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
2011-08-03 01:19:58 +08:00
|
|
|
fi
|
2013-04-18 05:39:25 +08:00
|
|
|
/usr/bin/update-desktop-database &> /dev/null || :
|
2006-09-05 03:19:23 +08:00
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
|
2011-08-03 01:19:58 +08:00
|
|
|
%posttrans
|
|
|
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
2013-04-18 05:39:25 +08:00
|
|
|
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
2011-07-14 06:00:28 +08:00
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
|
2011-07-14 06:00:28 +08:00
|
|
|
%files
|
2013-04-22 02:05:06 +08:00
|
|
|
%doc README COPYING NEWS
|
2006-06-27 05:17:45 +08:00
|
|
|
%{_bindir}/%{name}
|
2006-07-25 19:24:09 +08:00
|
|
|
|
2008-09-11 06:51:18 +08:00
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
|
2013-03-17 09:32:29 +08:00
|
|
|
%{_datadir}/%{name}/ui/*.ui
|
2013-04-19 04:03:43 +08:00
|
|
|
%{_datadir}/%{name}/virt-manager
|
|
|
|
%{_datadir}/%{name}/virtManager
|
2006-07-25 19:24:09 +08:00
|
|
|
|
2011-07-12 23:50:11 +08:00
|
|
|
%{_datadir}/%{name}/icons
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/*
|
2010-03-24 02:27:30 +08:00
|
|
|
|
2013-09-24 08:40:43 +08:00
|
|
|
%{_datadir}/appdata/%{name}.appdata.xml
|
2011-07-14 06:00:28 +08:00
|
|
|
%{_datadir}/applications/%{name}.desktop
|
2013-04-18 05:39:25 +08:00
|
|
|
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
|
2014-09-30 20:41:18 +08:00
|
|
|
%{_datadir}/GConf/gsettings/org.virt-manager.virt-manager.convert
|
2013-03-17 09:32:29 +08:00
|
|
|
|
2011-07-14 06:00:28 +08:00
|
|
|
|
|
|
|
%files common -f %{name}.lang
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
|
2013-04-11 05:13:02 +08:00
|
|
|
%{_datadir}/%{name}/virtcli
|
2013-03-18 07:32:19 +08:00
|
|
|
%{_datadir}/%{name}/virtconv
|
|
|
|
%{_datadir}/%{name}/virtinst
|
|
|
|
|
2006-07-25 19:24:09 +08:00
|
|
|
|
2013-03-18 07:32:19 +08:00
|
|
|
%files -n virt-install
|
|
|
|
%{_mandir}/man1/virt-install.1*
|
|
|
|
%{_mandir}/man1/virt-clone.1*
|
|
|
|
%{_mandir}/man1/virt-convert.1*
|
2014-01-19 23:37:14 +08:00
|
|
|
%{_mandir}/man1/virt-xml.1*
|
2013-03-18 07:32:19 +08:00
|
|
|
|
|
|
|
%{_datadir}/%{name}/virt-install
|
|
|
|
%{_datadir}/%{name}/virt-clone
|
|
|
|
%{_datadir}/%{name}/virt-convert
|
2014-01-19 23:37:14 +08:00
|
|
|
%{_datadir}/%{name}/virt-xml
|
2013-03-18 07:32:19 +08:00
|
|
|
|
|
|
|
%{_bindir}/virt-install
|
|
|
|
%{_bindir}/virt-clone
|
|
|
|
%{_bindir}/virt-convert
|
2014-01-19 23:37:14 +08:00
|
|
|
%{_bindir}/virt-xml
|