From d105ef6be0a8b46d996a5adb3ee970b9e5e23240 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 17 Mar 2005 17:19:34 +0000 Subject: [PATCH] * acinclude.m4: Add macro for defining SHARED_MIME_DIR. * configure.in: Use AM_SHARED_MIME macro. * src/data/Makefile.am: Use defined GCONF_SCHEMA_FILE_DIR and SHARED_MIME_DIR, not the hardcoded paths. svn: r4199 --- gramps2/ChangeLog | 6 ++++++ gramps2/acinclude.m4 | 16 ++++++++++++++++ gramps2/configure.in | 1 + gramps2/src/data/Makefile.am | 16 ++++++++-------- 4 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 gramps2/acinclude.m4 diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 10c3a2991..7a642178f 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2005-03-17 Alex Roitman + * acinclude.m4: Add macro for defining SHARED_MIME_DIR. + * configure.in: Use AM_SHARED_MIME macro. + * src/data/Makefile.am: Use defined GCONF_SCHEMA_FILE_DIR and + SHARED_MIME_DIR, not the hardcoded paths. + 2005-03-17 Martin Hawlisch * src/Exporter.py (build_info_page): proofreading; (build_format_page): shrink the size of the window by using tooltips to display the diff --git a/gramps2/acinclude.m4 b/gramps2/acinclude.m4 new file mode 100644 index 000000000..8c202ca2d --- /dev/null +++ b/gramps2/acinclude.m4 @@ -0,0 +1,16 @@ +dnl AM_SHARED_MIME +dnl Defines SHARED_MIME_DIR which is where mime type definitions should go. +dnl + +AC_DEFUN([AM_SHARED_MIME], +[ + if test "x$SHARED_MIME_DIR" = "x"; then + SHARED_MIME_DIR='$(prefix)/share/mime' + fi + + AC_ARG_WITH(mime-dir, + [ --with-mime-dir=dir Shared mime directory.],SHARED_MIME_DIR="$withval",) + + AC_SUBST(SHARED_MIME_DIR) + AC_MSG_RESULT([Using directory $SHARED_MIME_DIR for installation of mime type definitions]) +]) diff --git a/gramps2/configure.in b/gramps2/configure.in index 19b09365d..58485a21d 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -17,6 +17,7 @@ then fi AM_GCONF_SOURCE_2 +AM_SHARED_MIME AC_SUBST(RELEASE) AC_SUBST(VERSIONSTRING) diff --git a/gramps2/src/data/Makefile.am b/gramps2/src/data/Makefile.am index 903d7999d..367b4bf30 100644 --- a/gramps2/src/data/Makefile.am +++ b/gramps2/src/data/Makefile.am @@ -22,8 +22,8 @@ EXTRA_DIST = \ gramps.schemas install-schemas: - $(INSTALL) -d $(DESTDIR)$(sysconfdir)/gconf/schemas - $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.schemas $(DESTDIR)$(sysconfdir)/gconf/schemas + $(INSTALL) -d $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR) + $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.schemas $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR) -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ gconftool-2 --makefile-install-rule $(top_srcdir)/src/data/gramps.schemas -pkill gconfd @@ -35,12 +35,12 @@ install-data-local: install-schemas $(INSTALL_DATA) $(top_srcdir)/src/data/gnome-mime-application-x-*.png $(DESTDIR)$(prefix)/share/icons/gnome/48x48/mimetypes/ $(INSTALL) -d $(DESTDIR)$(prefix)/share/application-registry $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.applications $(DESTDIR)$(prefix)/share/application-registry - $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages - $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.xml $(DESTDIR)$(prefix)/share/mime/packages + $(INSTALL) -d $(DESTDIR)$(SHARED_MIME_DIR)/packages + $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.xml $(DESTDIR)$(SHARED_MIME_DIR)/packages $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime-info $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.keys $(DESTDIR)$(prefix)/share/mime-info $(INSTALL_DATA) $(top_srcdir)/src/data/gramps.mime $(DESTDIR)$(prefix)/share/mime-info - update-mime-database $(DESTDIR)$(prefix)/share/mime + update-mime-database $(DESTDIR)$(SHARED_MIME_DIR) uninstall-local: -rm $(DESTDIR)$(prefix)/share/applications/gramps.desktop @@ -48,8 +48,8 @@ uninstall-local: -rm $(DESTDIR)$(prefix)/share/mime-info/gramps.keys -rm $(DESTDIR)$(prefix)/share/mime-info/gramps.mime -rm $(DESTDIR)$(prefix)/share/application-registry/gramps.applications - -rm $(DESTDIR)$(prefix)/share/mime/packages/gramps.xml - -rm $(DESTDIR)$(sysconfdir)/gconf/schemas/gramps.schemas - update-mime-database $(DESTDIR)$(prefix)/share/mime + -rm $(DESTDIR)$(SHARED_MIME_DIR)/packages/gramps.xml + -rm $(DESTDIR)$(GCONF_SCHEMA_FILE_DIR)/gramps.schemas + update-mime-database $(DESTDIR)$(SHARED_MIME_DIR) -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ gconftool-2 --makefile-uninstall-rule $(top_srcdir)/src/data/gramps.schemas