virt-manager/virt-manager.spec
Charles Arnold 87b925fba3 - Fix broken define in virtinst-qed.diff
- Enforce dependency on vm-install version 0.5.6 

- bnc#722524 - [SLES11SP2Beta6] virt-manager fails to change the 
  device model for the NICs from default to virtio (kvm)
- bnc#683667 - On KVM, virt-manager incorrectly writed duplicated 
  device information into guest's configuration file
  (/etc/libvirt/qemu/DOMNAME.xml)
  virt-manager version 0.9.0

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=72
2011-10-18 14:23:43 +00:00

299 lines
8.9 KiB
RPMSpec

#
# spec file for package virt-manager (Version 0.9.0)
#
# Copyright (c) 2011 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/
#
# norootforbuild
%define _extra_release %{?dist:%{dist}}%{!?dist:%{?extra_release:%{extra_release}}}
%define gsysconfdir /etc
%define gconftool /usr/bin/gconftool-2
%define virtinst_maj 0
%define virtinst_min 600
%define virtinst_rel 0
%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
Version: 0.9.0
Release: 1
Group: System/Monitoring
License: GPLv2+
Url: http://virt-manager.et.redhat.com
Source0: virt-manager-%{version}.tar.bz2
Source1: %{virtinst_name}.tar.bz2
# see https://bugzilla.redhat.com/show_bug.cgi?id=620216,
# https://bugzilla.novell.com/show_bug.cgi?id=641981
Patch1: virtman-netstats-fix.diff
Patch2: virtman-finish-button-fix.diff
Patch3: virtman-shutoff-fix.diff
Patch4: virtman-set-has-window-fix.diff
Patch5: virtman-grep-fix.diff
Patch6: virtman-no-cd-present-fix.diff
Patch7: virtman-resize-menu-fix.diff
Patch8: virtman-vcpu-count-fix.diff
Patch9: virtman-storage-pool-fix.diff
Patch10: virtman-domain-name-fix.diff
Patch11: virtman-unapplied-changes-fix.diff
Patch12: virtman-details-fix.diff
Patch13: virtman-delete-fix.diff
Patch14: virtman-collidelist-fix.diff
Patch15: virtman-char-device-mode-fix.diff
Patch50: virtman-desktop.diff
Patch51: virtman-vminstall.diff
Patch52: virtman-cdrom.diff
Patch53: virtman-kvm.diff
Patch54: virtman-help.diff
Patch55: virtman-keycombo.diff
Patch56: virtman-autoconnect.diff
Patch60: virtman-device-flags.diff
Patch61: virtman-autorestart.diff
Patch62: virtman-storage-pool.diff
Patch63: virtman-eepro100.diff
Patch64: virtman-qed.diff
Patch100: virtinst-hv-version-fix.diff
Patch101: virtinst-initrd-inject-fix.diff
Patch102: virtinst-initrd-inject2-fix.diff
Patch103: virtinst-no-volume-fix.diff
Patch104: virtinst-prompts-fix.diff
Patch105: virtinst-cpu-model-name-fix.diff
Patch106: virtinst-xml-clear-fix.diff
Patch107: virtinst-remote-storage-fix.diff
Patch108: virtinst-error-message-fix.diff
Patch109: virtinst-typo-fix.diff
Patch110: virtinst-cdrom.diff
Patch111: virtinst-storage-ocfs2.diff
Patch112: virtinst-qed.diff
ExclusiveArch: %{ix86} x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
#
#rpmlint BuildRequires: python
BuildRequires: gtk2-devel
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: scrollkeeper
BuildRequires: intltool
#rpmlint BuildRequires: python-gtk
BuildRequires: python-gtk-devel
BuildRequires: python-gobject2-devel
BuildRequires: gconf2-devel
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
# virtinst BuildRequires
BuildRequires: libxml2-python
BuildRequires: python-urlgrabber
#BuildRequires: libvirt-python
#
# Requires: pygtk2 >= 1.99.12-6
Requires: python-gtk
# Requires: gnome-python2-gconf >= 1.99.11-7
Requires: python-gnome
# Absolutely require this version or newer
Requires: libvirt-python >= 0.5.0
Requires: vm-install >= 0.5.6
# Definitely does not work with earlier due to python API changes
# Requires: dbus-python >= 0.61
Requires: dbus-1-python
Requires: dbus-1-x11
#Requires: gnome-keyring >= 0.4.9
Requires: gnome-keyring
# Minimum we've tested with
# Although if you don't have this, comment it out and the app
# will work just fine - keyring functionality will simply be
# disabled
# Requires: gnome-python2-gnomekeyring >= 2.15.4
# Requires: gnome-python2-gnomevfs >= 2.15.4
Requires: libxml2-python >= 2.6.23
# Required to install Xen & QEMU guests
# Requires: python-virtinst >= 0.300.2
# Required for loading the glade UI
# Requires: pygtk2-libglade
# Required for our graphics which are currently SVG format
# Earlier vte had broken python binding module
# Requires: vte >= 0.12.2
%ifarch x86_64
Requires: vtemodule.so()(64bit)
%else
Requires: vtemodule.so
%endif
# For online help
Requires: scrollkeeper
# For console widget
# Requires: gtk-vnc-python
Requires: python-gtk-vnc
# Requires: librsvg added to avoid problems with minimal template
Requires: librsvg
Requires: netcat-openbsd
# Add requires for non Xen installations
Requires: python-urlgrabber
Requires: vm-install
#Requires: spice-gtk
%description
Virtual Machine Manager provides a graphical tool for administering
virtual machines.
Authors:
--------
Daniel Berrange <berrange@redhat.com>
Hugh O. Brock <hbrock@redhat.com>
Jeremy Katz <katzj@redhat.com>
%prep
%setup -q
%setup -b 1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
#%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch60 -p1
%patch61 -p1
#%patch62 -p1
%patch63 -p1
%patch64 -p1
pushd $RPM_BUILD_DIR/%{virtinst_name}
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
popd
# sed -i -e "s@sr\@Latn@sr\@latin@" configure
# mv po/sr@Latn.po po/sr@latin.po
%build
# autoreconf -i
%configure --sysconfdir=%{gsysconfdir}
make %{?_smp_mflags}
pushd $RPM_BUILD_DIR/%{virtinst_name}
python setup.py build
popd
%install
make install DESTDIR=$RPM_BUILD_ROOT
pushd $RPM_BUILD_DIR/%{virtinst_name}
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --install-lib=%{pysite}/
rm -rf $RPM_BUILD_ROOT/var/scrollkeeper
popd
# Unsupport languages:
rm -rf $RPM_BUILD_ROOT/usr/share/locale/or
%find_gconf_schemas
for lang_file in %{name} virtinst
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
%run_suseconfig -m glib2
%run_suseconfig -m gtk2
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%files -f %{name}.lst
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog
%{_bindir}/%{name}
%{_bindir}/%{name}-tui
%{_bindir}/virt-clone
%{_bindir}/virt-convert
%{_bindir}/virt-image
%{_bindir}/virt-install
%{_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
%dir %{_datadir}/%{name}/virtManager
%dir %{_datadir}/%{name}/virtManagerTui
%dir %{_datadir}/%{name}/virtManagerTui/importblacklist
%{_datadir}/%{name}/virtManager/*.py
%{_datadir}/%{name}/virtManagerTui/*.py
%{_datadir}/%{name}/virtManagerTui/importblacklist/*.py
%dir %{pysite}/virtinst
%{pysite}/virtinst/*.py
%{pysite}/virtinst/*.pyc
%{_datadir}/applications/YaST2/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/virt-clone.1*
%{_mandir}/man1/virt-convert.1*
%{_mandir}/man1/virt-image.1*
%{_mandir}/man1/virt-install.1*
%{_mandir}/man5/virt-image.5*
%dir %{pysite}/virtconv
%{pysite}/virtconv/*.py
%{pysite}/virtconv/*.pyc
%dir %{pysite}/virtconv/parsers
%{pysite}/virtconv/parsers/*.py
%{pysite}/virtconv/parsers/*.pyc
%{pysite}/%{virtinst_name}-py2.?.egg-info
# FIXME: autobuild complains that these are unowned (not true...)
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_datadir}/applications/YaST2
%changelog