configure: Add --disable-install-shared-mime-info option
authorKeith Packard <keithp@keithp.com>
Wed, 10 Sep 2014 07:03:53 +0000 (00:03 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 10 Sep 2014 07:03:53 +0000 (00:03 -0700)
This inhibits the installation of the shared mime info data file and
updating of the shared mime database. Necessary if you want to use a
distribution-specific shared mime installation hook, like dh_installmime

Signed-off-by: Keith Packard <keithp@keithp.com>
configure.ac
icon/Makefile.am

index 311ebbe35a65c7e0e0f12cbbb352c5f347be9328..9f2cb0d7db00ed220b612d8b374d315b7f73e106 100644 (file)
@@ -497,6 +497,14 @@ esac
        
 AM_CONDITIONAL([MULTI_ARCH], [test x$MULTI_ARCH = xyes])
 
+AC_ARG_ENABLE([install-shared-mime-info],
+             [AS_HELP_STRING([--disable-install-shared-mime-info],
+                             [disable installing shared mime info files (default=yes)])],
+             [INSTALL_SHARED_MIME_INFO=$enableval],
+             [INSTALL_SHARED_MIME_INFO=yes])
+
+AM_CONDITIONAL([INSTALL_SHARED_MIME_INFO], [test x$INSTALL_SHARED_MIME_INFO = xyes])
+
 AC_OUTPUT([
 Makefile
 src/Makedefs
@@ -557,6 +565,7 @@ echo "    Android support.............: ${HAVE_ANDROID_SDK}"
 echo "    STlink support..............: ${HAVE_STLINK}"
 echo "    Local pdclib................: ${HAVE_PDCLIB}"
 echo "    i386 and amd64 libaltos.....: ${MULTI_ARCH}"
+echo "    install shared mime info....: ${INSTALL_SHARED_MIME_INFO}"
 echo ""
 echo "  Java"
 echo "    freetts.....................: ${FREETTS}"
index d0cd9853bc7a50b83a55b53e9365404cbce9124e..c08e9236e91ac75392edd300dea1f9440d1af2e4 100644 (file)
@@ -85,8 +85,10 @@ MIME_ICONS = $(EEPROM_ICON) $(TELEM_ICON) $(MPD_ICON)
 mimeicondir = $(ICON_THEME)/scalable/mimetypes
 mimeicon_DATA = $(MIME_ICONS)
 
+if INSTALL_SHARED_MIME_INFO
 mimedir = $(datadir)/mime/packages
 mime_DATA = org-altusmetrum-mimetypes.xml
+endif
 
 pixmapdir = $(datadir)/pixmaps
 pixmap_DATA = altusmetrum.xpm
@@ -116,9 +118,11 @@ clean-local:
        $(RM) *.build *.ico *.rc *.icns *.o *.exe $(MPD_ICON)
        $(RM) altusmetrum.xpm
 
+if INSTALL_SHARED_MIME_INFO
 install-data-hook:
        update-mime-database $(DESTDIR)$(datadir)/mime
        update-icon-caches $(DESTDIR)$(ICON_THEME)
+endif
 
 $(MPD_ICON): $(MP_ICON)
        $(LN_S) $(MP_ICON) $@