[pybliographer] Make optional rule to update desktop cache database



commit 816b6d8759a874f81a20a3e776e8adcc8eedee2e
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Thu Mar 20 10:52:28 2014 -0700

    Make optional rule to update desktop cache database
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705249
    Fixes SF bug #92

 Makefile.am  |   16 ++++++++++------
 configure.ac |    7 +++++++
 2 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index fa9bc80..e0e4dde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,8 @@
 # 
 # 
 
+DISTCHECK_CONFIGURE_FLAGS = --disable-update-desktop-database
+
 pybdir  = $(datadir)/$(PACKAGE)
 appdir  = $(datadir)/applications
 
@@ -79,10 +81,12 @@ pybliographic.keys: pybliographic.keys.in Makefile
        < $(srcdir)/pybliographic.keys.in > pybliographic.keys.tmp \
        && mv pybliographic.keys.tmp pybliographic.keys
 
-install-data-hook:
-       update-desktop-database $(DESTDIR)$(appdir) \
-               || echo "**** Warning: cannot update mime cache (recommended for Gnome >= 2.8)"
+update_desktop_database = update-desktop-database $(DESTDIR)$(appdir) \
+       || echo "**** Warning: cannot update mime cache (recommended for Gnome >= 2.8)"
 
-uninstall-hook:
-       update-desktop-database $(appdir) \
-               || echo "**** Warning: cannot update mime cache (recommended for Gnome >= 2.8)"
+install-data-hook: update-desktop-database
+uninstall-hook: update-desktop-database
+update-desktop-database:
+if ENABLE_UPDATE_DESKTOP_DATABASE
+       $(update_desktop_database)
+endif
diff --git a/configure.ac b/configure.ac
index fa22ba8..54371dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,13 @@ dnl NLS is now hand-managed for python.
 # Documentation
 GNOME_DOC_INIT
 
+AC_ARG_ENABLE(update-desktop-database,
+AC_HELP_STRING([--disable-update-desktop-database],
+       [do not update desktop database after installation]),,
+       enable_update_desktop_database=yes)
+
+AM_CONDITIONAL(ENABLE_UPDATE_DESKTOP_DATABASE, test x$enable_update_desktop_database = xyes)
+
 AC_CONFIG_FILES(       
        Makefile 
        po/Makefile


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