[passepartout] ensure standards compliance of the desktop file



commit 0f76c922588adfdb4f72b6041104a96501b6aea8
Author: Sven Herzberg <herzi lanedo com>
Date:   Sun Apr 12 14:34:27 2009 +0200

    ensure standards compliance of the desktop file
    
    * configure.ac: make sure "desktop-file-validate" is available
    * Makefile.am: added a check-local rule to validate the .desktop file
    * passepartout.desktop.in: changes for specification compliance
---
 Makefile.am             |    8 ++++++++
 configure.ac            |   10 ++++++++++
 passepartout.desktop.in |    4 ++--
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 74fb772..db9b982 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,14 @@ applications_DATA=$(applications_in_files:.in=)
 applicationsdir=$(datarootdir)/applications
 @INTLTOOL_DESKTOP_RULE@
 
+check-local: $(applications_DATA)
+	@echo "[TEST] $<"
+	@tmpfile=`mktemp`; \
+	if ! $(DESKTOP_FILE_VALIDATE) $< > $$tmpfile || test "`wc -l $$tmpfile | $(AWK) '{print $$1}'`" -gt 0; then \
+		cat $$tmpfile >&2; \
+		false; \
+	fi
+
 intltool_in_files=\
 	intltool-extract.in \
 	intltool-merge.in \
diff --git a/configure.ac b/configure.ac
index 6cfc756..34a879d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,16 @@ AC_FUNC_FORK
 AC_FUNC_STAT
 AC_CHECK_FUNCS([realpath strdup mkdtemp])
 
+dnl  -------------------
+dnl | test applications |
+dnl  -------------------
+
+AC_PATH_PROGS(DESKTOP_FILE_VALIDATE,[desktop-file-validate],[no])
+if test "${DESKTOP_FILE_VALIDATE}" = "no"; then
+	AC_MSG_ERROR([desktop-file-validate not found, please install desktop-file-utils from
+		      http://www.freedesktop.org/software/desktop-file-utils/releases/])
+fi
+
 dnl  ------
 dnl | i18n |
 dnl  ------
diff --git a/passepartout.desktop.in b/passepartout.desktop.in
index fd14b97..463db30 100644
--- a/passepartout.desktop.in
+++ b/passepartout.desktop.in
@@ -2,8 +2,8 @@
 _Name=Passepartout
 _GenericName=Desktop publishing application
 _Comment=Desktop publishing application
-Icon=pptout-icon.png
+Icon=pptout-icon
 Exec=passepartout
 Terminal=false
 Type=Application
-Categories=Application;Office;
+Categories=GTK;GNOME;Office;Publishing;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]