virt-manager/virt-manager.spec

201 lines
5.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package virt-manager
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define gsysconfdir /etc
%define gconftool /usr/bin/gconftool-2
%define virtinst_maj 0
%define virtinst_min 600
%define virtinst_rel 4
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
Name: virt-manager
Summary: Virtual Machine Manager
License: GPL-2.0+
Group: System/Monitoring
Version: 0.9.5
Release: 0
Url: http://virt-manager.et.redhat.com
Source0: virt-manager-%{version}.tar.bz2
Patch0: virtman-dropped-connection-segfault.patch
Patch1: virtman-memleak-disable-graph.patch
Patch2: virtman-memleak-callbacks.patch
Patch3: virtman-graph-row-spacing.patch
Patch50: virtman-desktop.patch
Patch51: virtman-cdrom.patch
Patch52: virtman-kvm.patch
Patch53: virtman-keycombo.patch
Patch54: virtman-autoconnect.patch
Patch60: virtman-device-flags.patch
Patch61: virtman-autorestart.patch
Patch62: virtman-eepro100.patch
Patch63: virtman-qed.patch
Patch64: virtman-update-backend.patch
Patch65: virtman-slow-mouse.patch
Patch66: virtman-vminstall.patch
Patch67: virtman-reverse-serialcon.patch
Patch68: virtman-default-guest-from-host-os.patch
Patch69: virtman-allow-pv-iso-install.patch
Patch70: virtman-autoyast-support.patch
ExclusiveArch: %{ix86} x86_64 s390x
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
#
BuildRequires: desktop-file-utils
BuildRequires: gconf2-devel
BuildRequires: gettext
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: scrollkeeper
BuildRequires: update-desktop-files
Requires: dbus-1-python
Requires: dbus-1-x11
Requires: gnome-keyring
Requires: libvirt-python >= 0.7.0
Requires: libxml2-python >= 2.6.23
Requires: vm-install >= 0.5.6
%ifarch %{ix86}
Requires: vtemodule.so
%else
Requires: vtemodule.so()(64bit)
%endif
Requires: librsvg
Requires: netcat-openbsd
Requires: python-gconf
Requires: python-gobject2
Requires: python-gtk
Requires: python-gtk-vnc
Requires: python-urlgrabber
Requires: python-virtinst == %{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
Requires: scrollkeeper
Requires: xorg-x11-fonts
Recommends: python-SpiceClientGtk
%description
Virtual Machine Manager provides a graphical tool for administering virtual
machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices,
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.
Authors:
--------
Daniel Berrange <berrange@redhat.com>
Hugh O. Brock <hbrock@redhat.com>
Jeremy Katz <katzj@redhat.com>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%build
# autoreconf -i
%configure --sysconfdir=%{gsysconfdir} --with-tui=no
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Unsupport languages:
rm -rf $RPM_BUILD_ROOT/usr/share/locale/or
%find_gconf_schemas
for lang_file in %{name}
do
%find_lang $lang_file single_lang_file.lang
done
cat %{name}.schemas_list single_lang_file.lang > %{name}.lst
sed -i '\^/usr/share/gnome/help/^d' %{name}.lst
%suse_update_desktop_file %{name} X-SuSE-YaST-Virtualization
sed -i -e 's/Categories=.*/Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Virtualization;/' $RPM_BUILD_ROOT/%{_datadir}/applications/YaST2/%{name}.desktop
%clean
# rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%post
%if 0%{?suse_version} < 1140
%run_suseconfig -m glib2
%run_suseconfig -m gtk2
%else
%desktop_database_post
%icon_theme_cache_post
%endif
%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%icon_theme_cache_postun
%endif
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%files -f %{name}.lst
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog
%{_bindir}/%{name}
%{_libexecdir}/%{name}-launch
%dir %{_datadir}/%{name}
#%{_datadir}/%{name}/*.glade
%dir %{_datadir}/%{name}/pixmaps
%dir %{_datadir}/%{name}/icons
%dir %{_datadir}/%{name}/icons/hicolor/
%dir %{_datadir}/%{name}/icons/hicolor/*/
%dir %{_datadir}/%{name}/icons/hicolor/*/*/
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/*/
%dir %{_datadir}/icons/hicolor/*/*/
%{_datadir}/%{name}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/%{name}/*.py
%{_datadir}/%{name}/*.ui
%dir %{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/virtManager/*.py
%{_datadir}/applications/YaST2/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service
%{_mandir}/man1/%{name}.1*
# FIXME: autobuild complains that these are unowned (not true...)
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_datadir}/applications/YaST2
%changelog