[Pkg-libvirt-commits] [SCM] VirtViewer Debian packaging branch, master, updated. debian/0.5.6-2

Guido Günther agx at sigxcpu.org
Tue Jun 25 15:26:44 UTC 2013


The following commit has been merged in the master branch:
commit 508a44f51e0080cca558872dec9e1c2ac3c87284
Author: Guido Günther <agx at sigxcpu.org>
Date:   Tue Jun 25 16:54:07 2013 +0200

    Install spice-xpi-client-remote-viewer
    
    and make it available as alternative for spice-xpi-client
    
    Closes: #704217

diff --git a/debian/rules b/debian/rules
index 2d07552..ea0bd2a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@
 DEB_CONFIGURE_EXTRA_FLAGS := --with-gtk=3.0
 ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64))
     DEB_CONFIGURE_EXTRA_FLAGS += --with-spice-gtk
+    HAVE_SPICE := 1
 endif
 
 %:
@@ -13,3 +14,9 @@ override_dh_auto_configure:
 
 override_dh_auto_clean:
 	[ ! -f Makefile ] || dh_auto_clean
+
+override_dh_auto_install:
+	dh_auto_install
+	[ ! "${HAVE_SPICE}" ] || install -m0755 \
+               data/spice-xpi-client-remote-viewer \
+	       debian/virt-viewer/usr/bin/
diff --git a/debian/virt-viewer.postinst b/debian/virt-viewer.postinst
new file mode 100644
index 0000000..fc50e3e
--- /dev/null
+++ b/debian/virt-viewer.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+    if [ -x /usr/bin/spice-xpi-client-remote-viewer ]; then
+      update-alternatives --install /usr/bin/spice-xpi-client \
+        spice-xpi-client /usr/bin/spice-xpi-client-remote-viewer 70
+    fi
+fi
+
+#DEBHELPER#
diff --git a/debian/virt-viewer.prerm b/debian/virt-viewer.prerm
new file mode 100644
index 0000000..41450ae
--- /dev/null
+++ b/debian/virt-viewer.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
+    if [ -x /usr/bin/spice-xpi-client-remote-viewer ]; then
+        update-alternatives --remove spice-xpi-client \
+                  /usr/bin/spice-xpi-client-remote-viewer
+    fi
+fi
+
+#DEBHELPER#

-- 
VirtViewer Debian packaging



More information about the Pkg-libvirt-commits mailing list