summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrnndxb wxcy2015-12-09 00:27:00 -0500
committerrnndxb wxcy2015-12-09 00:27:00 -0500
commite1558f6138fd6766b65ddff980a6383611d32102 (patch)
tree8a61fd6b588486d0b297aedc2783ac4212df5b65
downloadaur-virtviewer-nogui.tar.gz
Ready for release
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD31
-rw-r--r--remove-ui-widgets.patch84
-rw-r--r--virtviewer-nogui.install13
4 files changed, 154 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c52eebb84a1e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+# Generated by mksrcinfo v8
+# Wed Dec 9 02:49:56 UTC 2015
+pkgbase = virtviewer-nogui
+ pkgdesc = A graphical console viewer for virtual machines, without the UI widgets
+ pkgver = 3.0
+ pkgrel = 1
+ url = http://virt-manager.org/
+ install = virtviewer-nogui.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = intltool
+ makedepends = spice-protocol
+ depends = gtk-vnc
+ depends = libvirt
+ depends = spice-gtk3
+ depends = desktop-file-utils
+ provides = virtviewer
+ conflicts = virtviewer
+ source = http://virt-manager.org/download/sources/virt-viewer/virt-viewer-3.0.tar.gz
+ source = remove-ui-widgets.patch
+ md5sums = f36b1b85da943eba7ad72fd93ba63435
+ md5sums = dcd69b82a689b27b4a7c45a187a6fd57
+
+pkgname = virtviewer-nogui
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..518b8ceb79c3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: ntwk <rnndxb@gmail.com>
+
+_pkgname=virtviewer
+pkgname=${_pkgname}-nogui
+pkgver=3.0
+pkgrel=1
+pkgdesc="A graphical console viewer for virtual machines, without the UI widgets"
+depends=('gtk-vnc' 'libvirt' 'spice-gtk3' 'desktop-file-utils')
+makedepends=('intltool' 'spice-protocol')
+provides=('virtviewer')
+conflicts=('virtviewer')
+url="http://virt-manager.org/"
+arch=('i686' 'x86_64')
+license=('GPL')
+install=${pkgname}.install
+source=(http://virt-manager.org/download/sources/virt-viewer/virt-viewer-${pkgver}.tar.gz
+ 'remove-ui-widgets.patch')
+md5sums=('f36b1b85da943eba7ad72fd93ba63435'
+ 'dcd69b82a689b27b4a7c45a187a6fd57')
+
+build() {
+ cd $srcdir/virt-viewer-$pkgver
+ patch -p1 -i ../remove-ui-widgets.patch
+ ./configure --prefix=/usr --with-gtk=3.0 --disable-update-mimedb
+ make
+}
+
+package() {
+ cd $srcdir/virt-viewer-$pkgver
+ make DESTDIR=$pkgdir install
+}
diff --git a/remove-ui-widgets.patch b/remove-ui-widgets.patch
new file mode 100644
index 000000000000..62e47b064c83
--- /dev/null
+++ b/remove-ui-widgets.patch
@@ -0,0 +1,84 @@
+diff -ru virt-viewer-3.0.orig/src/virt-viewer-window.c virt-viewer-3.0/src/virt-viewer-window.c
+--- virt-viewer-3.0.orig/src/virt-viewer-window.c 2015-12-08 20:48:35.660683590 -0500
++++ virt-viewer-3.0/src/virt-viewer-window.c 2015-12-08 20:48:54.070648495 -0500
+@@ -477,9 +477,6 @@
+ virt_viewer_display_set_monitor(priv->display, -1);
+ virt_viewer_display_set_fullscreen(priv->display, FALSE);
+ }
+- ViewAutoDrawer_SetActive(VIEW_AUTODRAWER(priv->layout), FALSE);
+- gtk_widget_show(menu);
+- gtk_widget_hide(priv->toolbar);
+ gtk_widget_set_size_request(GTK_WIDGET(priv->window), -1, -1);
+ gtk_window_unfullscreen(GTK_WINDOW(priv->window));
+
+@@ -1057,43 +1054,6 @@
+ gtk_widget_set_no_show_all(priv->toolbar, TRUE);
+ gtk_toolbar_set_style(GTK_TOOLBAR(priv->toolbar), GTK_TOOLBAR_BOTH_HORIZ);
+
+- /* Close connection */
+- button = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_CLOSE));
+- gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("Disconnect"));
+- gtk_widget_show(GTK_WIDGET(button));
+- gtk_toolbar_insert(GTK_TOOLBAR(priv->toolbar), GTK_TOOL_ITEM (button), 0);
+- g_signal_connect(button, "clicked", G_CALLBACK(virt_viewer_window_menu_file_quit), self);
+-
+- /* USB Device selection */
+- button = gtk_image_new_from_icon_name("virt-viewer-usb",
+- GTK_ICON_SIZE_INVALID);
+- button = GTK_WIDGET(gtk_tool_button_new(button, NULL));
+- gtk_tool_button_set_label(GTK_TOOL_BUTTON(button), _("USB device selection"));
+- gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("USB device selection"));
+- gtk_toolbar_insert(GTK_TOOLBAR(priv->toolbar), GTK_TOOL_ITEM(button), 0);
+- g_signal_connect(button, "clicked", G_CALLBACK(virt_viewer_window_menu_file_usb_device_selection), self);
+- priv->toolbar_usb_device_selection = button;
+- gtk_widget_show_all(button);
+-
+- /* Send key */
+- button = GTK_WIDGET(gtk_tool_button_new(NULL, NULL));
+- gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(button), "preferences-desktop-keyboard-shortcuts");
+- gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("Send key combination"));
+- gtk_widget_show(GTK_WIDGET(button));
+- gtk_toolbar_insert(GTK_TOOLBAR(priv->toolbar), GTK_TOOL_ITEM(button), 0);
+- g_signal_connect(button, "clicked", G_CALLBACK(virt_viewer_window_toolbar_send_key), self);
+- gtk_widget_set_sensitive(button, FALSE);
+- priv->toolbar_send_key = button;
+-
+- /* Leave fullscreen */
+- button = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_LEAVE_FULLSCREEN));
+- gtk_tool_button_set_label(GTK_TOOL_BUTTON(button), _("Leave fullscreen"));
+- gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("Leave fullscreen"));
+- gtk_tool_item_set_is_important(GTK_TOOL_ITEM(button), TRUE);
+- gtk_widget_show(GTK_WIDGET(button));
+- gtk_toolbar_insert(GTK_TOOLBAR(priv->toolbar), GTK_TOOL_ITEM(button), 0);
+- g_signal_connect(button, "clicked", G_CALLBACK(virt_viewer_window_toolbar_leave_fullscreen), self);
+-
+ priv->layout = ViewAutoDrawer_New();
+
+ ViewAutoDrawer_SetActive(VIEW_AUTODRAWER(priv->layout), FALSE);
+@@ -1101,9 +1061,13 @@
+ ViewOvBox_SetUnder(VIEW_OV_BOX(priv->layout), GTK_WIDGET(priv->notebook));
+ ViewAutoDrawer_SetOffset(VIEW_AUTODRAWER(priv->layout), -1);
+ ViewAutoDrawer_SetFill(VIEW_AUTODRAWER(priv->layout), FALSE);
+- ViewAutoDrawer_SetOverlapPixels(VIEW_AUTODRAWER(priv->layout), 1);
++ ViewAutoDrawer_SetOverlapPixels(VIEW_AUTODRAWER(priv->layout), 0);
+ ViewAutoDrawer_SetNoOverlapPixels(VIEW_AUTODRAWER(priv->layout), 0);
+ gtk_widget_show(priv->layout);
++
++ gtk_widget_show(priv->toolbar);
++ ViewAutoDrawer_SetActive(VIEW_AUTODRAWER(priv->layout), TRUE);
++ ViewAutoDrawer_Close(VIEW_AUTODRAWER(priv->layout));
+ }
+
+ VirtViewerNotebook*
+diff -ru virt-viewer-3.0.orig/src/virt-viewer.xml virt-viewer-3.0/src/virt-viewer.xml
+--- virt-viewer-3.0.orig/src/virt-viewer.xml 2015-12-08 20:48:35.660683590 -0500
++++ virt-viewer-3.0/src/virt-viewer.xml 2015-12-08 20:48:54.070648495 -0500
+@@ -13,7 +13,7 @@
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuBar" id="top-menu">
+- <property name="visible">True</property>
++ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="menu-file">
diff --git a/virtviewer-nogui.install b/virtviewer-nogui.install
new file mode 100644
index 000000000000..4d07c984a772
--- /dev/null
+++ b/virtviewer-nogui.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+ update-mime-database /usr/share/mime > /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}