Commits

Erik Grinaker committed ab267e8

allow disabling mime, desktop and gconf schema install

Comments (0)

Files changed (7)

 
 2005-02-05  Erik Grinaker <erikg@codepoet.no>
 
+	* add --disable-mime-update and --disable-desktop-update
+	configure switches, instead of relying on $(DESTDIR)
+
+	* respect --disable-schemas-install configure switch
+
+2005-02-05  Erik Grinaker <erikg@codepoet.no>
+
 	* autosave after drag/drop, if enabled
 
 2005-02-02  Erik Grinaker <erikg@codepoet.no>
-xxxx-xx-xx: Revelation 0.4.0
+2005-02-08: Revelation 0.4.0
 ============================
 
 New features:
 - treeview keyboard commands caused unhandled exception
 - autosave file on drag/drop, if enabled
 - set default button for overwrite dialog to cancel
+- added configure switches for disabling mime and desktop update
+- respect --disable-schemas-install configure switch
 - build byte-compiled datahandler modules
 
 
+AC_DEFUN(RVL_FDO_MIME, [
+	AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
+	AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
+
+	AC_ARG_ENABLE(desktop-update, [AC_HELP_STRING(--disable-desktop-update, Disable the MIME desktop database update)], disable_desktop=yes, disable_desktop=no)
+	AC_ARG_ENABLE(mime-update, [AC_HELP_STRING(--disable-mime-update, Disable the MIME database update)], disable_mime=yes, disable_mime=no)
+
+	AM_CONDITIONAL(HAVE_FDO_DESKTOP, test "x$UPDATE_DESKTOP_DATABASE" != "xno" -a "x$disable_desktop" = "xno")
+	AM_CONDITIONAL(HAVE_FDO_MIME, test "x$UPDATE_MIME_DATABASE" != "xno" -a "x$disable_mime" = "xno")
+])
+
+AC_DEFUN(RVL_GCONF, [
+	AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+
+	if test "x$GCONFTOOL" = "xno"; then
+		AC_MSG_ERROR(gconftool-2 not found in your path)
+	fi
+
+	AM_GCONF_SOURCE_2
+])
+
+AC_DEFUN(RVL_PYTHON_MODULE, [
+	AC_MSG_CHECKING(python module $1)
+
+	$PYTHON -c "import $1" 2>/dev/null
+
+	if test $? -eq 0; then
+		AC_MSG_RESULT(yes)
+		eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
+	else
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR(failed to find module $1)
+		exit 1
+	fi
+])
+
+AC_DEFUN(RVL_PYTHON_PATH, [
+	AC_MSG_CHECKING(Python include path)
+	AC_ARG_WITH(python-include, [AC_HELP_STRING(--with-python-include=PATH, Path to Pyton include dir)], PYTHON_INCLUDE=$withval)
+
+	if test -z "$PYTHON_INCLUDE" ; then
+		PYTHON_INCLUDE=$PYTHON
+		rvl_py_include_path=`echo $PYTHON_INCLUDE | sed -e "s/bin/include/"`
+		rvl_py_version="`$PYTHON -c "import sys; print sys.version[[0:3]]"`";
+		PY_INCLUDE="$rvl_py_include_path$rvl_py_version"
+	fi
+
+	AC_MSG_RESULT($PYTHON_INCLUDE)
+	AC_SUBST(PYTHON_INCLUDE)
+])
+
 dnl initialize autoconf/automake
 AC_PREREQ(2.53)
 AC_INIT(src/revelation.in)
-AM_INIT_AUTOMAKE(revelation, 0.4.0-pre2)
-
-
-dnl some macros
-AC_DEFUN([AC_PYTHON_MODULE],[
-	AC_MSG_CHECKING(python module: $1)
-	python -c "import $1" 2>/dev/null
-
-	if test $? -eq 0; then
-		AC_MSG_RESULT(yes)
-		eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
-	else
-		AC_MSG_RESULT(no)
-		eval AS_TR_CPP(HAVE_PYMOD_$1)=no
-
-		if test -n "$2"; then
-			AC_MSG_ERROR(failed to find required module $1)
-			exit 1
-		fi
-	fi
-])
-
-AC_DEFUN(PFK_PYTHON_PATH,[
-	AC_MSG_CHECKING(Python include path)
-	AC_ARG_WITH(python-include, 
-		[  --with-python-include=PATH  path to where Python.h lives 
-			(default: /usr/local/include/pythonN.M], PY_INCLUDE=$withval )
-
-	if test -z "$PY_INCLUDE" ; then
-		PY_INCLUDE=$PYTHON
-		pfk_py_include_path=`echo $PY_INCLUDE | sed -e "s/bin/include/"`
-		pfk_py_version="`$PYTHON -c "import sys; print sys.version[[0:3]]"`";
-		PY_INCLUDE="$pfk_py_include_path$pfk_py_version"
-	fi
-
-	AC_MSG_RESULT($PY_INCLUDE)
-	AC_SUBST(PY_INCLUDE)dnl
-])
+AM_INIT_AUTOMAKE(revelation, 0.4.0)
 
 
 dnl check for dependencies
 AC_PROG_CC()
+
 AM_PATH_PYTHON(2.3)
-PFK_PYTHON_PATH()
+RVL_PYTHON_PATH()
+RVL_PYTHON_MODULE(Crypto, yes)
 PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.3.90)
 PKG_CHECK_MODULES(GNOME_PYTHON, gnome-python-2.0 >= 2.5.90)
-AC_PYTHON_MODULE(Crypto, yes)
 
-AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-if test x"$GCONFTOOL" = xno; then
-	AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
-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)
-
+RVL_GCONF()
+RVL_FDO_MIME()
 
 
 dnl output files
 schema_DATA	= revelation.schemas
 
 install-data-hook:
+if GCONF_SCHEMAS_INSTALL
 	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
 	$(GCONFTOOL) --makefile-install-rule $(schema_DATA)
-
-if FDO_MIME
-	if test -z "$(DESTDIR)"; then \
-		$(UPDATE_DESKTOP_DATABASE); \
-	fi
 endif
 
+if HAVE_FDO_DESKTOP
+	$(UPDATE_DESKTOP_DATABASE)
+endif
+

data/mime/Makefile.am

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

src/lib/config.py.in

 APPNAME		= "Revelation"
 VERSION		= "@VERSION@"
 DATAVERSION	= 1
-RELNAME		= "Getting there"
+RELNAME		= "Mu!"
 URL		= "http://oss.codepoet.no/revelation/"
 AUTHOR		= "Erik Grinaker <erikg@codepoet.no>"
 COPYRIGHT	= "Copyright \302\251 2003-2005 Erik Grinaker"