From 95c89880e67e6dba194a261ba8caa4da836c010d Mon Sep 17 00:00:00 2001 From: dockes Date: Fri, 2 Dec 2005 16:17:29 +0000 Subject: [PATCH] install filters to /usr/local --- src/common/rclconfig.cpp | 15 ++++++++++----- src/recollinstall.in | 8 ++++++-- src/sampleconf/recoll.conf.in | 6 +++++- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp index 92fc1d95..fdff84b5 100644 --- a/src/common/rclconfig.cpp +++ b/src/common/rclconfig.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.14 2005-11-25 09:13:06 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.15 2005-12-02 16:17:29 dockes Exp $ (C) 2004 J.F.Dockes"; #endif #include #include @@ -176,9 +176,9 @@ string RclConfig::getMimeIconName(const string &mtype) return hs; } -// Look up an executable filter. -// We look in RECOLL_BINDIR, RECOLL_CONFDIR, then let the system use -// the PATH +// Look up an executable filter. +// We look in RECOLL_FILTERSDIR, filtersdir param, RECOLL_CONFDIR, then +// let the system use the PATH string find_filter(RclConfig *conf, const string &icmd) { // If the path is absolute, this is it @@ -187,11 +187,16 @@ string find_filter(RclConfig *conf, const string &icmd) string cmd; const char *cp; - if (cp = getenv("RECOLL_BINDIR")) { + + if (cp = getenv("RECOLL_FILTERSDIR")) { cmd = cp; path_cat(cmd, icmd); if (access(cmd.c_str(), X_OK) == 0) return cmd; + } else if (conf->getConfParam(string("filtersdir"), cmd)) { + path_cat(cmd, icmd); + if (access(cmd.c_str(), X_OK) == 0) + return cmd; } else { cmd = conf->getConfDir(); path_cat(cmd, icmd); diff --git a/src/recollinstall.in b/src/recollinstall.in index f4f474e6..8f98dd75 100755 --- a/src/recollinstall.in +++ b/src/recollinstall.in @@ -30,6 +30,7 @@ if test $# = 1 ; then ${PREFIX}/share \ ${PREFIX}/share/recoll \ ${PREFIX}/share/recoll/examples \ + ${PREFIX}/share/recoll/filters \ ${PREFIX}/share/recoll/images \ ${PREFIX}/share/recoll/translations do @@ -40,11 +41,15 @@ if test $# = 1 ; then ${INSTALL} qtgui/recoll index/recollindex recollinstall $PREFIX/bin \ || exit 1 - ${INSTALL} filters/rcl* ${PREFIX}/share/recoll/examples/ || exit 1 + ${INSTALL} filters/rcl* ${PREFIX}/share/recoll/filters/ || exit 1 + chmod a+x ${PREFIX}/share/recoll/filters/rcl* || exit 1 + # Clean up possible old filters in examples + rm -f ${PREFIX}/share/recoll/examples/rcl* ${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \ ${PREFIX}/share/recoll/examples/ || exit 1 + ${INSTALL} qtgui/mtpics/*.png ${PREFIX}/share/recoll/images || exit 1 ${INSTALL} qtgui/recoll*.qm ${PREFIX}/share/recoll/translations || exit 1 @@ -75,7 +80,6 @@ EOF mkdir $HOME/.recoll || exit 1 cp ${PREFIX}/share/recoll/examples/* $HOME/.recoll - chmod a+x $HOME/.recoll/rcl* chmod +w $HOME/.recoll/recoll.conf chmod +w $HOME/.recoll/mimeconf diff --git a/src/sampleconf/recoll.conf.in b/src/sampleconf/recoll.conf.in index bae4bfdb..6a34dfa5 100644 --- a/src/sampleconf/recoll.conf.in +++ b/src/sampleconf/recoll.conf.in @@ -1,4 +1,4 @@ -# @(#$Id: recoll.conf.in,v 1.3 2005-11-30 18:26:02 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: recoll.conf.in,v 1.4 2005-12-02 16:17:29 dockes Exp $ (C) 2004 J.F.Dockes # Recoll default configuration file. This should be copied to # ~/.recoll/recoll.conf @@ -14,6 +14,10 @@ skippedNames = *~ #* .* bin CVS Cache caughtspam tmp loglevel = 4 logfilename = stderr +# Place to search for executable filters. If RECOLL_FILTERSDIR is set in +# the environement, we use it instead +filtersdir = @prefix@/share/recoll/filters + # Languages for which to build stemming databases at the end of # indexing. Stemmer names can be found on the xapian site indexstemminglanguages = english french