Add guestfs-browser.desktop file.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 27 Jul 2011 11:22:03 +0000 (12:22 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 27 Jul 2011 13:23:30 +0000 (14:23 +0100)
Makefile.am
guestfs-browser.desktop [new file with mode: 0644]
test-desktop-file-validate.sh [new file with mode: 0755]

index 21cab22..e535ffe 100644 (file)
@@ -1,5 +1,5 @@
 # Guestfs Browser.
-# Copyright (C) 2010 Red Hat Inc.
+# Copyright (C) 2010-2011 Red Hat Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,10 +24,14 @@ EXTRA_DIST = \
        .gitignore guestfs-browser.spec \
        guestfs-browser.pod \
        guestfs-browser.1 \
+       guestfs-browser.desktop \
+       test-desktop-file-validate.sh \
        html/pod.css
 
 CLEANFILES = *.cmi *.cmo *.cmx *.cmxa *.o guestfs-browser *~
 
+TESTS =
+
 # These are listed here in alphabetical order.
 SOURCES = \
        cmdline.mli \
@@ -114,6 +118,12 @@ throbber.ml: Throbber.png Throbber.gif
 .ml.cmx:
        $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
 
+# Desktop file.
+desktopdir = $(datadir)/applications
+desktop_DATA = guestfs-browser.desktop
+
+TESTS += test-desktop-file-validate.sh
+
 # Man page.
 man_MANS = guestfs-browser.1
 
diff --git a/guestfs-browser.desktop b/guestfs-browser.desktop
new file mode 100644 (file)
index 0000000..7d37778
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Virtual Machine Filesystem Browser
+Comment=Browse inside the filesystems of virtual machines (guestfs-browser)
+Exec=guestfs-browser
+Type=Application
+Terminal=false
+Categories=System;
diff --git a/test-desktop-file-validate.sh b/test-desktop-file-validate.sh
new file mode 100755 (executable)
index 0000000..2810267
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh -
+# Guestfs Browser.
+# Copyright (C) 2011 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+target=guestfs-browser.desktop
+
+if ! desktop-file-validate --help >/dev/null 2>&1; then
+    echo "install 'desktop-file-validate' program to validate the $target file"
+    exit 0
+fi
+
+exec desktop-file-validate "$target"