From 782694cd4105be497c398f5d4c6cc742d136fb81 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 28 Jan 2012 11:26:25 +0100 Subject: [PATCH] spice-vdagent: update to 0.8.1, systemd switch. --- srcpkgs/spice-vdagent/files/spice-vdagentd.rc | 18 ------------ .../files/spice-vdagentd.service | 10 +++++++ .../patches/Makefile-fixes.patch | 28 ------------------- srcpkgs/spice-vdagent/template | 25 ++++++++--------- 4 files changed, 21 insertions(+), 60 deletions(-) delete mode 100644 srcpkgs/spice-vdagent/files/spice-vdagentd.rc create mode 100644 srcpkgs/spice-vdagent/files/spice-vdagentd.service delete mode 100644 srcpkgs/spice-vdagent/patches/Makefile-fixes.patch diff --git a/srcpkgs/spice-vdagent/files/spice-vdagentd.rc b/srcpkgs/spice-vdagent/files/spice-vdagentd.rc deleted file mode 100644 index 792675dba5..0000000000 --- a/srcpkgs/spice-vdagent/files/spice-vdagentd.rc +++ /dev/null @@ -1,18 +0,0 @@ -#!/sbin/runscript - -command=/sbin/spice-vdagentd -description="Agent daemon for Spice guests" - -depend() -{ - need localmount dbus -} - -start_pre() -{ - local vdagent_sock=/var/run/spice-vdagentd/spice-vdagent-sock - - if [ -S $vdagent_sock ]; then - rm -f $vdagent_sock - fi -} diff --git a/srcpkgs/spice-vdagent/files/spice-vdagentd.service b/srcpkgs/spice-vdagent/files/spice-vdagentd.service new file mode 100644 index 0000000000..550a2fd6e2 --- /dev/null +++ b/srcpkgs/spice-vdagent/files/spice-vdagentd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Agent Daemon for Spice Guests + +[Service] +ExecStartPre=/bin/modprobe uinput +ExecStartPre=-rm -f /var/run/spice-vdagentd/spice-vdagent-sock +ExecStart=/usr/sbin/spice-vdagentd + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/spice-vdagent/patches/Makefile-fixes.patch b/srcpkgs/spice-vdagent/patches/Makefile-fixes.patch deleted file mode 100644 index 4a33fb4b67..0000000000 --- a/srcpkgs/spice-vdagent/patches/Makefile-fixes.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- Makefile.orig 2011-02-21 21:24:40.916848965 +0100 -+++ Makefile 2011-02-21 21:26:53.843354443 +0100 -@@ -23,23 +23,18 @@ install: build - install -d $(DESTDIR)$(socketdir) - install -p -m 755 spice-vdagent $(DESTDIR)$(bindir) - install -p -m 755 spice-vdagentd $(DESTDIR)$(sbindir) -- install -d $(DESTDIR)$(initdir) -- install -p -m 755 spice-vdagentd.sh $(DESTDIR)$(initdir)/spice-vdagentd - install -d $(DESTDIR)$(xdgautostartdir) -- install -d $(DESTDIR)$(gdmautostartdir) - desktop-file-install --dir=$(DESTDIR)$(xdgautostartdir) \ - spice-vdagent.desktop -- desktop-file-install --dir=$(DESTDIR)$(gdmautostartdir) \ -- spice-vdagent.desktop - - clean: - rm -f $(TARGETS) *.o *~ - - spice-vdagentd: vdagentd.o vdagentd-uinput.o udscs.o vdagent-virtio-port.o console-kit.o -- $(CC) -o $@ $^ $(shell pkg-config --libs dbus-1) -+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(shell pkg-config --libs dbus-1) -o $@ - - spice-vdagent: vdagent.o vdagent-x11.o udscs.o -- $(CC) -o $@ $^ -lX11 -lXrandr -lXfixes -+ $(CC) $(CFLAGS) $^ $(LDFLAGS) -lX11 -lXrandr -lXfixes -o $@ - - tag: - @git tag -a -m "Tag as spice-vdagent-$(VERSION)" spice-vdagent-$(VERSION) diff --git a/srcpkgs/spice-vdagent/template b/srcpkgs/spice-vdagent/template index 70f88551f6..4fa153a65b 100644 --- a/srcpkgs/spice-vdagent/template +++ b/srcpkgs/spice-vdagent/template @@ -1,12 +1,11 @@ # Template file for 'spice-vdagent' pkgname=spice-vdagent -version=0.6.3 +version=0.8.1 distfiles="http://www.spicespace.org/download/releases/$pkgname-$version.tar.bz2" -build_style=gnu-makefile -revision=1 +build_style=gnu-configure short_desc="Spice agent for Linux" maintainer="Juan RP " -checksum=6553254b1b73cc2f2ff9ca4c1f4986b7efefca264158a16301098421bdae2498 +checksum=99ec232805a6201da78d409e6f874ff0aa6bb25e7ffe623aa77752539ae7d7ff long_desc=" Features: * Client mouse mode (no need to grab mouse by client, no mouse lag) @@ -17,21 +16,19 @@ Features: * Support of copy and paste (text and images) between the active X-session and the client" -keep_empty_dirs=yes -openrc_services="${pkgname}d default true" +systemd_services="${pkgname}d.service on" + +Add_dependency run dbus +Add_dependency run ConsoleKit-x11 +Add_dependency full desktop-file-utils Add_dependency build pkg-config -Add_dependency build desktop-file-utils Add_dependency build dbus-devel Add_dependency build libXfixes-devel -Add_dependency build libX11-devel Add_dependency build libXrandr-devel Add_dependency build spice-protocol -Add_dependency full dbus -Add_dependency full ConsoleKit-x11 -post_install() -{ - # Install the OpenRC service. - vinstall ${FILESDIR}/${pkgname}d.rc 755 etc/init.d ${pkgname}d +post_install() { + rm -rf ${DESTDIR}/etc/rc.d + vinstall ${FILESDIR}/${pkgname}d.service 644 lib/systemd/system }