c2a4f4f
# -*- rpm-spec -*-
c2a4f4f
c2a4f4f
# This macro is used for the continuous automated builds. It just
c2a4f4f
# allows an extra fragment based on the timestamp to be appended
c2a4f4f
# to the release. This distinguishes automated builds, from formal
c2a4f4f
# Fedora RPM builds
c2a4f4f
%define _extra_release %{?extra_release:%{extra_release}}
c2a4f4f
c2a4f4f
Name: virt-manager
9671c3f
Version: 0.2.1
9671c3f
Release: 1%{_extra_release}
c2a4f4f
Summary: Virtual Machine Manager
c2a4f4f
c2a4f4f
Group: Applications/Emulators
c2a4f4f
License: GPL
c2a4f4f
URL: http://virt-manager.et.redhat.com/
9671c3f
Source0: http://virt-manager.et.redhat.com/download/sources/%{name}/%{name}-%{version}.tar.gz
c2a4f4f
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c2a4f4f
c2a4f4f
# These two are just the oldest version tested
c2a4f4f
Requires: pygtk2 >= 1.99.12-6
c2a4f4f
Requires: gnome-python2-gconf >= 1.99.11-7
c2a4f4f
# Absolutely require this version or newer
a785d06
Requires: libvirt-python >= 0.1.4-3
c2a4f4f
# Definitely does not work with earlier due to python API changes
c2a4f4f
Requires: dbus-python >= 0.61
c2a4f4f
# Might work with earlier, but this is what we've tested
c2a4f4f
# We use 'ctypes' so don't need the 'gnome-keyring-python' bits
c2a4f4f
Requires: gnome-keyring >= 0.4.9
c2a4f4f
# Minimum we've tested with
a785d06
# Although if you don't have this, comment it out and the app
a785d06
# will work just fine - keyring functionality will simply be
a785d06
# disabled 
a785d06
Requires: gnome-python2-gnomekeyring >= 2.15.4
a785d06
# Minimum we've tested with
a785d06
Requires: libxml2-python >= 2.6.23
a785d06
# Required to install Xen guests
a785d06
Requires: python-xeninst >= 0.90.1
c2a4f4f
a785d06
# Earlier vte han broken python binding module
a785d06
Requires: vte >= 0.12.2
c2a4f4f
01b5ca9
ExclusiveArch: %{ix86} x86_64 ia64
01b5ca9
c2a4f4f
BuildRequires: pygtk2-devel
c2a4f4f
BuildRequires: gtk2-devel
c2a4f4f
BuildRequires: python-devel
628e68d
BuildRequires: gettext
c2a4f4f
9671c3f
Requires(pre): GConf2
9671c3f
Requires(post): GConf2
9671c3f
Requires(preun): GConf2
9671c3f
c2a4f4f
%description
c2a4f4f
Virtual Machine Manager provides a graphical tool for administering
c2a4f4f
virtual machines such as Xen. It uses libvirt as the backend management
c2a4f4f
API.
c2a4f4f
c2a4f4f
%prep
c2a4f4f
%setup -q
c2a4f4f
c2a4f4f
%build
c2a4f4f
%configure
c2a4f4f
make %{?_smp_mflags}
c2a4f4f
c2a4f4f
c2a4f4f
%install
c2a4f4f
rm -rf $RPM_BUILD_ROOT
c2a4f4f
make install  DESTDIR=$RPM_BUILD_ROOT
c2a4f4f
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.a
c2a4f4f
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.la
a785d06
%find_lang %{name}
c2a4f4f
c2a4f4f
%clean
c2a4f4f
rm -rf $RPM_BUILD_ROOT
c2a4f4f
9671c3f
%pre
9671c3f
if [ "$1" -gt 1 ]; then
9671c3f
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
9671c3f
    gconftool-2 --makefile-uninstall-rule \
9671c3f
      %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
9671c3f
fi
9671c3f
9671c3f
%post
9671c3f
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
9671c3f
gconftool-2 --makefile-install-rule \
9671c3f
  %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
9671c3f
9671c3f
update-desktop-database %{_datadir}/applications
9671c3f
9671c3f
%postun
9671c3f
update-desktop-database %{_datadir}/applications
9671c3f
9671c3f
%preun
9671c3f
if [ "$1" -eq 0 ]; then
9671c3f
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
9671c3f
    gconftool-2 --makefile-uninstall-rule \
9671c3f
      %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
9671c3f
fi
9671c3f
a785d06
%files -f %{name}.lang
c2a4f4f
%defattr(-,root,root,-)
c2a4f4f
%doc README COPYING AUTHORS ChangeLog NEWS
9671c3f
%{_sysconfdir}/gconf/schemas/%{name}.schemas
c2a4f4f
%{_bindir}/%{name}
c2a4f4f
%{_libexecdir}/%{name}-launch
c2a4f4f
%{_libdir}/%{name}/*
c2a4f4f
c2a4f4f
%{_datadir}/%{name}/*.glade
c2a4f4f
%{_datadir}/%{name}/pixmaps/*.png
c2a4f4f
%{_datadir}/%{name}/pixmaps/*.svg
c2a4f4f
c2a4f4f
%{_datadir}/%{name}/*.py
c2a4f4f
%{_datadir}/%{name}/*.pyc
c2a4f4f
%ghost %{_datadir}/%{name}/*.pyo
c2a4f4f
c2a4f4f
%{_datadir}/%{name}/virtManager/*.py
c2a4f4f
%{_datadir}/%{name}/virtManager/*.pyc
c2a4f4f
%ghost %{_datadir}/%{name}/virtManager/*.pyo
c2a4f4f
c2a4f4f
%{_datadir}/%{name}/vncViewer/*.py
c2a4f4f
%{_datadir}/%{name}/vncViewer/*.pyc
c2a4f4f
%ghost %{_datadir}/%{name}/vncViewer/*.pyo
c2a4f4f
a785d06
c2a4f4f
%{_datadir}/applications/%{name}.desktop
c2a4f4f
%{_datadir}/dbus-1/services/%{name}.service
c2a4f4f
c2a4f4f
%changelog
9671c3f
* Mon Sep  4 2006 Daniel Berrange <berrange@redhat.com> - 0.2.1-1
9671c3f
- Updated to 0.2.1 tar.gz
9671c3f
- Added rules to install/uninstall gconf schemas in preun,post,pre
9671c3f
  scriptlets
9671c3f
- Updated URL for source to reflect new upstream download URL
9671c3f
628e68d
* Thu Aug 24 2006 Jeremy Katz <katzj@redhat.com> - 0.2.0-3
628e68d
- BR gettext
628e68d
01b5ca9
* Thu Aug 24 2006 Jeremy Katz <katzj@redhat.com> - 0.2.0-2
01b5ca9
- only build on arches with virt
01b5ca9
a785d06
* Tue Aug 22 2006 Daniel Berrange <berrange@redhat.com> - 0.2.0-1
a785d06
- Added wizard for creating virtual machines
a785d06
- Added embedded serial console
a785d06
- Added ability to take screenshots
a785d06
c2a4f4f
* Mon Jul 24 2006 Daniel Berrange <berrange@redhat.com> - 0.1.5-2
c2a4f4f
- Prefix *.pyo files with 'ghost' macro
c2a4f4f
- Use fully qualified URL in Source  tag
c2a4f4f
c2a4f4f
* Thu Jul 20 2006 Daniel Berrange <berrange@redhat.com> - 0.1.5-1
c2a4f4f
- Update to new 0.1.5 release snapshot
c2a4f4f
c2a4f4f
* Thu Jul 20 2006 Daniel Berrange <berrange@redhat.com> - 0.1.4-1
c2a4f4f
- Update to new 0.1.4 release snapshot
c2a4f4f
c2a4f4f
* Mon Jul 17 2006 Daniel Berrange <berrange@redhat.com> - 0.1.3-1
c2a4f4f
- Fix License tag
c2a4f4f
- Updated for new release
c2a4f4f
c2a4f4f
* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-3
c2a4f4f
- Added missing copyright headers on all .py files
c2a4f4f
c2a4f4f
* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-2
c2a4f4f
- Added python-devel to BuildRequires
c2a4f4f
c2a4f4f
* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-1
c2a4f4f
- Change URL to public location
c2a4f4f
c2a4f4f
* Fri Jun 16 2006 Daniel Berrange <berrange@redhat.com> - 0.1.0-1
c2a4f4f
- Added initial support for using VNC console
c2a4f4f
c2a4f4f
* Thu Apr 20 2006 Daniel Berrange <berrange@redhat.com> - 0.0.2-1
c2a4f4f
- Added DBus remote control service
c2a4f4f
c2a4f4f
* Wed Mar 29 2006 Daniel Berrange <berrange@redhat.com> - 0.0.1-1
c2a4f4f
- Initial RPM build