install filters to /usr/local

This commit is contained in:
dockes 2005-12-02 16:17:29 +00:00
parent 24ea431872
commit 95c89880e6
3 changed files with 21 additions and 8 deletions

View File

@ -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 <unistd.h>
#include <errno.h>
@ -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);

View File

@ -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

View File

@ -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