Commits

Erik Grinaker committed 9be42a3

improved fd.o shared MIME handling when building

Comments (0)

Files changed (5)

 
 ---------------[ xxxx-xx-xx : 0.4.0-pre2 ]---------------
 
+2005-01-29  Erik Grinaker <erikg@codepoet.no>
+
+	* check for fd.o shared MIME utils at build-time, and avoid
+	rebuilding MIME databases if not found
+
+	* don't update MIME databases at build-time if DESTDIR is set
+
 2005-01-28  Erik Grinaker <erikg@codepoet.no>
 
 	* run update-desktop-database on make install so that
 Bugfixes:
 - allow entry drag'n'drop to folder directly before/after entry
 - place Revelation under Accessories in the GNOME menu (Utility category)
-- build authmanager module with position-independent code
-- don't install authmanager module into bindir
 - install mimetype icon into correct directory
 - run update-desktop-database on install, to register app for mimetype
+- don't install authmanager module into bindir
+- build authmanager module with position-independent code
+- allow installation when fd.o shared MIME utils are missing
+- don't update MIME databases at build-time if DESTDIR is set
 
 Code changes:
 - updated unit tests for ui module
 fi
 AM_GCONF_SOURCE_2
 
+AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
+AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
+
+AM_CONDITIONAL(FDO_MIME, test x$UPDATE_MIME_DATABASE != xno -a x$UPDATE_DESKTOP_DATABASE != xno)
+
+
 
 dnl output files
 AC_OUTPUT([
 	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
 	$(GCONFTOOL) --makefile-install-rule $(schema_DATA)
 
-	update-desktop-database
+if FDO_MIME
+	if test -z "$(DESTDIR)"; then \
+		$(UPDATE_DESKTOP_DATABASE); \
+	fi
+endif
 

data/mime/Makefile.am

 mimedir		= $(datadir)/mime/packages
 
 install-data-hook:
-	update-mime-database $(datadir)/mime
+if FDO_MIME
+	@if test -z "$(DESTDIR)"; then \
+		$(UPDATE_MIME_DATABASE) "$(datadir)/mime"; \
+	fi
+endif