[gnome-keyring] gcr: Don't update the MIME database if DESTDIR is set



commit 06bd6a1a2952c80bbffa4ee220585e4c6e90a7b0
Author: Kalev Lember <kalevlember gmail com>
Date:   Wed Aug 31 23:51:48 2011 +0300

    gcr: Don't update the MIME database if DESTDIR is set
    
    This way the configure defaults work for binary distributions and they
    don't need to pass --disable-update-mime to configure.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657871

 gcr/Makefile.am |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index 739c0c2..05d23fc 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -190,17 +190,19 @@ mimedir = $(datadir)/mime/packages
 mime_DATA = gcr-crypto-types.xml
 
 if WITH_UPDATE_MIME
-install-data-local:
-	mkdir -p $(mimedir)
-	update-mime-database $(datadir)/mime/
-
-uninstall-local:
-	update-mime-database $(datadir)/mime/
-else
-install-data-local:
-
-uninstall-local:
-
+update_mime_database_cmd = update-mime-database $(datadir)/mime/
+
+install-data-hook: update_mime_database
+uninstall-hook: update_mime_database
+
+update_mime_database:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating MIME database."; \
+		$(update_mime_database_cmd); \
+	else \
+		echo "*** MIME database not updated.  After (un)install, run this:"; \
+		echo "***   $(update_mime_database_cmd)"; \
+	fi
 endif
 
 desktopdir = $(datadir)/applications



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