Blob Blame History Raw
Name:           spice-vdagent
Version:        0.8.1
Release:        1%{?dist}
Summary:        Agent for Spice guests
Group:          Applications/System
License:        GPLv3+
URL:            http://spice-space.org/
Source0:        http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2
# These take us to the latest upstream git, which is needed for RHEL 5 compat
# It is about time for a new upstream release with this included!
Patch1:         0001-vdagentd-Fix-a-memory-leak-on-agent-message-parsing-.patch
Patch2:         0002-Change-VDAGENTD_GUEST_XORG_RESOLUTION-message-to-wor.patch
Patch3:         0003-Make-mouse-handling-multiple-monitor-aware.patch
Patch4:         0004-vdagentd-Autogenerate-a-Xinerama-xorg.conf-for-multi.patch
Patch5:         0005-Add-missing-src-vdagentd-xorg-conf.h-file.patch
Patch6:         0006-Fix-various-compiler-warnings.patch
Patch7:         0007-Lower-autoconf-require-to-2.63.patch
Patch8:         0008-vdagentd-Revert-part-of-571948ffb78eddd3015c456d084e.patch
Patch9:         0009-buildsys-Lower-autoconf-requires.patch
Patch10:        0010-Add-a-enable-static-uinput-option.patch
Patch11:        0011-vdagentd-uinput-Correct-interpretation-of-coordinate.patch
Patch12:        0012-vdagentd-Close-the-virtio-port-when-the-active-vdage.patch
Patch13:        0013-Add-a-RHEL-5-README-and-xorg.conf-example-file.patch
# HACK: there is no spice-protocol in the el5 build repository
Patch14:        spice-vdagent-0.8.1-no-spice-protocol.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  libpciaccess-devel dbus-devel libXrender-devel
BuildRequires:  libXrandr-devel libXinerama-devel libXfixes-devel libtool
BuildRequires:  desktop-file-utils
ExclusiveArch:  i686 x86_64
Requires(post):   chkconfig
Requires(preun):  chkconfig
Requires(preun):  initscripts

%description
Spice agent for Linux guests offering the following features:

Features:
* Client mouse mode (no need to grab mouse by client, no mouse lag)
  this is handled by the daemon by feeding mouse events into the kernel
  via uinput. This will only work if the active X-session is running a
  spice-vdagent process so that its resolution can be determined.
* Automatic adjustment of the X-session resolution to the client resolution
* Support of copy and paste (text and images) between the active X-session
  and the client

After installation  please see README.RHEL-5 for some RHEL-5 specific notes!


%prep
%setup -q
%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
autoreconf -f -i


%build
%configure --disable-console-kit --enable-static-uinput
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# systemd file, not needed for RHEL-5
rm $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/spice-vdagentd.conf
# RHEL-5 gdm does not have a way to autostart programs in the gdm session
rm -r $RPM_BUILD_ROOT%{_datadir}/gdm


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/chkconfig --add spice-vdagentd

%preun
if [ $1 = 0 ] ; then
    /sbin/service spice-vdagentd stop >/dev/null 2>&1
    /sbin/chkconfig --del spice-vdagentd
fi

# No postun, restarting spice-vdagentd goes the uinput dev to go away
# making the X-server loose mouse input!


%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README README.RHEL-5 TODO data/xorg.conf.RHEL-5
/etc/rc.d/init.d/spice-vdagentd
%{_bindir}/spice-vdagent
%{_sbindir}/spice-vdagentd
%{_var}/log/spice-vdagentd
%{_var}/run/spice-vdagentd
%{_sysconfdir}/xdg/autostart/spice-vdagent.desktop


%changelog
* Tue Jan 10 2012 Hans de Goede <hdegoede@redhat.com> - 0.8.1-1
- Initial EPEL5 spice-vdagent package