virt-manager/virt-manager.spec
Charles Arnold d63d020de9 - Added upstream bug fixes.
1240-cdrom-driver-name.patch
  1242-delete-active-vm.patch
  1245-storage-browser-selection.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=7
2009-09-21 22:05:46 +00:00

247 lines
8.3 KiB
RPMSpec

#
# spec file for package virt-manager (Version 0.8.0)
#
# Copyright (c) 2009 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/
#
Name: virt-manager
%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 500
%define virtinst_rel 0
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
Version: 0.8.0
Release: 2
Summary: Virtual Machine Manager
Group: System/Monitoring
License: LGPL v2.1 or later
Url: http://virt-manager.et.redhat.com
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{ix86} x86_64
Source0: virt-manager-%{version}.tar.bz2
Source1: %{virtinst_name}.tar.bz2
Patch0: 1240-cdrom-driver-name.patch
Patch1: 1242-delete-active-vm.patch
Patch2: 1245-storage-browser-selection.patch
Patch51: virtman-desktop.diff
Patch52: virtman-vminstall.diff
Patch53: virtman-netcat.diff
Patch54: virtman-pointer.diff
Patch55: virtman-cdrom.diff
Patch56: virtman-kvm.diff
Patch57: virtman-bridge.diff
Patch58: virtman-manager.diff
Patch59: virtman-help.diff
Patch81: virtinst-cdrom.diff
# 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.3.0-1
Requires: vm-install
# 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
Requires: vte
# 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
# Add requires for non Xen installations
Requires: python-urlgrabber
Requires: vm-install
#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
%gconf_schemas_prereq
%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
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
#%patch57 -p1
%patch58 -p1
%patch59 -p1
pushd $RPM_BUILD_DIR/%{virtinst_name}
%patch81 -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=%{_datadir}/virt-manager
rm -f $RPM_BUILD_ROOT/usr/bin/virt-clone
rm -f $RPM_BUILD_ROOT/usr/bin/virt-image
rm -f $RPM_BUILD_ROOT/usr/bin/virt-install
rm -f $RPM_BUILD_ROOT/usr/bin/virt-convert
rm -f $RPM_BUILD_ROOT/usr/share/locale/ja/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/pl/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/fr/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/it/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/sr/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/pt_BR/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/sr@latin/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/zh_CN/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/es/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-clone.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-image.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-install.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-convert.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man5/virt-image.5
# rm -f $RPM_BUILD_ROOT/usr/share/virt-manager/virtinst-0.500.3-py2.?.egg-info
popd
#rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.a
#rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.la
# Unsupport languages:
rm -rf $RPM_BUILD_ROOT/usr/share/locale/or
%find_gconf_schemas
%find_lang %{name}
cat %{name}.schemas_list %{name}.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
# Nuking these because old version didnt have any
# rm -rf $RPM_BUILD_ROOT/usr/share/gnome
# Also fixing the %{name}.lang file forcibly.
# sed -i '\^/usr/share/gnome/help/^d' %{name}.lang
%clean
rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%files -f %{name}.lst
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog
# %dir %attr(775,root,root) /etc/gconf
# %dir %attr(775,root,root) /etc/gconf/schemas
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
%dir %{_datadir}/gconf
%dir %{_datadir}/gconf/schemas
%config %{_datadir}/gconf/schemas/%{name}.schemas
%else
%{gsysconfdir}/gconf/schemas/%{name}.schemas
%endif
%{_bindir}/%{name}
%{_libexecdir}/%{name}-launch
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*.glade
%dir %{_datadir}/%{name}/pixmaps
%{_datadir}/%{name}/pixmaps/*.png
%{_datadir}/%{name}/pixmaps/*.svg
%{_datadir}/%{name}/*.py
%dir %{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/virtManager/*.py
%dir %{_datadir}/%{name}/virtinst
%{_datadir}/%{name}/virtinst/*.py
%{_datadir}/%{name}/virtinst/*.pyc
# %dir %attr(775,root,root) %{_datadir}/locale/or
# %dir %attr(775,root,root) %{_datadir}/locale/or/LC_MESSAGES
# %{_datadir}/locale/or/LC_MESSAGES/*
%{_datadir}/omf/%{name}
%dir %attr(775,root,root) %{_datadir}/gnome
%{_datadir}/gnome/help
%{_datadir}/applications/YaST2/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service
%{_datadir}/man/man1/%{name}.1*
# new files for virt-manager-0.7.0
%dir %{_datadir}/%{name}/virtconv
%{_datadir}/%{name}/virtconv/*.py
%{_datadir}/%{name}/virtconv/*.pyc
%dir %{_datadir}/%{name}/virtconv/parsers
%{_datadir}/%{name}/virtconv/parsers/*.py
%{_datadir}/%{name}/virtconv/parsers/*.pyc
%{_datadir}/%{name}/virtinst-0.500.0-py2.6.egg-info
%doc %{_datadir}/gnome/help/%{name}/C/figures/*.png
%doc %{_datadir}/gnome/help/%{name}/C/*.xml
# FIXME: autobuild complains that these are unowned (not true...)
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_datadir}/applications/YaST2
%changelog