get prefix to really work
This commit is contained in:
parent
ce6839e154
commit
a448a0b452
@ -1,8 +1,4 @@
|
|||||||
# @(#$Id: Makefile,v 1.21 2005-12-06 15:10:36 dockes Exp $ (C) 2005 J.F.Dockes
|
# @(#$Id: Makefile,v 1.22 2005-12-16 10:06:56 dockes Exp $ (C) 2005 J.F.Dockes
|
||||||
|
|
||||||
# Default values. These can be overridden on the command line ie:
|
|
||||||
# make prefix=/usr
|
|
||||||
prefix=/usr/local
|
|
||||||
|
|
||||||
all: mk/sysconf common/rclversion.h
|
all: mk/sysconf common/rclversion.h
|
||||||
cd lib; ${MAKE}
|
cd lib; ${MAKE}
|
||||||
@ -43,6 +39,6 @@ distclean: clean
|
|||||||
rm -f mk/sysconf mk/localdefs sampleconf/recoll.conf recollinstall
|
rm -f mk/sysconf mk/localdefs sampleconf/recoll.conf recollinstall
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
./recollinstall ${prefix}
|
./recollinstall
|
||||||
|
|
||||||
.PHONY: all static clean distclean install
|
.PHONY: all static clean distclean install
|
||||||
|
|||||||
@ -4,6 +4,8 @@ XAPIANCXXFLAGS=@XAPIANCXXFLAGS@
|
|||||||
|
|
||||||
LIBICONV=@LIBICONV@
|
LIBICONV=@LIBICONV@
|
||||||
INCICONV=@INCICONV@
|
INCICONV=@INCICONV@
|
||||||
|
RECOLL_PREFIX=@prefix@
|
||||||
|
|
||||||
LOCALCXXFLAGS = $(INCICONV) $(XAPIANCXXFLAGS) -DRECOLL_PREFIX=\"@prefix@\"
|
LOCALCXXFLAGS = $(INCICONV) $(XAPIANCXXFLAGS) \
|
||||||
|
-DRECOLL_PREFIX=\"$(RECOLL_PREFIX)\"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.26 2005-12-15 14:39:57 dockes Exp $ (C) 2005 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: main.cpp,v 1.27 2005-12-16 10:06:56 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -29,7 +29,7 @@ using Rcl::AdvSearchData;
|
|||||||
|
|
||||||
#include "recollmain.h"
|
#include "recollmain.h"
|
||||||
|
|
||||||
static const char *recollsharedir = "/usr/local/share/recoll";
|
static const char *recollprefix = RECOLL_PREFIX;
|
||||||
|
|
||||||
RclConfig *rclconfig;
|
RclConfig *rclconfig;
|
||||||
Rcl::Db *rcldb;
|
Rcl::Db *rcldb;
|
||||||
@ -133,6 +133,15 @@ int main( int argc, char ** argv )
|
|||||||
qt.load( QString( "qt_" ) + QTextCodec::locale(), "." );
|
qt.load( QString( "qt_" ) + QTextCodec::locale(), "." );
|
||||||
a.installTranslator( &qt );
|
a.installTranslator( &qt );
|
||||||
|
|
||||||
|
// Translations for Recoll
|
||||||
|
string recollsharedir = path_cat(recollprefix, "share");
|
||||||
|
string translatdir = path_cat(recollsharedir, "translations");
|
||||||
|
QTranslator translator( 0 );
|
||||||
|
// QTextCodec::locale() returns $LANG
|
||||||
|
translator.load( QString("recoll_") + QTextCodec::locale(),
|
||||||
|
translatdir.c_str() );
|
||||||
|
a.installTranslator( &translator );
|
||||||
|
|
||||||
rwSettings(false);
|
rwSettings(false);
|
||||||
|
|
||||||
// Create main window and set its size to previous session's
|
// Create main window and set its size to previous session's
|
||||||
@ -161,14 +170,6 @@ int main( int argc, char ** argv )
|
|||||||
}
|
}
|
||||||
dbdir = path_tildexpand(dbdir);
|
dbdir = path_tildexpand(dbdir);
|
||||||
|
|
||||||
// Translations for Recoll
|
|
||||||
string translatdir = path_cat(recollsharedir, "translations");
|
|
||||||
QTranslator translator( 0 );
|
|
||||||
// QTextCodec::locale() returns $LANG
|
|
||||||
translator.load( QString("recoll_") + QTextCodec::locale(),
|
|
||||||
translatdir.c_str() );
|
|
||||||
a.installTranslator( &translator );
|
|
||||||
|
|
||||||
rclconfig->getConfParam("iconsdir", iconsdir);
|
rclconfig->getConfParam("iconsdir", iconsdir);
|
||||||
if (iconsdir.empty()) {
|
if (iconsdir.empty()) {
|
||||||
iconsdir = path_cat(recollsharedir, "images");
|
iconsdir = path_cat(recollsharedir, "images");
|
||||||
|
|||||||
@ -33,6 +33,7 @@ unix {
|
|||||||
UI_DIR = .ui
|
UI_DIR = .ui
|
||||||
MOC_DIR = .moc
|
MOC_DIR = .moc
|
||||||
OBJECTS_DIR = .obj
|
OBJECTS_DIR = .obj
|
||||||
|
DEFINES += RECOLL_PREFIX=\"$(RECOLL_PREFIX)\"
|
||||||
LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \
|
LIBS += ../lib/librcl.a ../bincimapmime/libmime.a \
|
||||||
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
|
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
|
||||||
-lz
|
-lz
|
||||||
|
|||||||
@ -8,19 +8,22 @@ fatal()
|
|||||||
}
|
}
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
fatal 'Usage: recollinstall <dir>, ie: recollinstall /usr/local'
|
fatal 'Usage: recollinstall [<dir>], ie: recollinstall /usr/local'
|
||||||
}
|
}
|
||||||
|
|
||||||
test $# = 1 || usage
|
if test $# -eq 0 ; then
|
||||||
|
PREFIX=@prefix@
|
||||||
|
elif test $# -eq 1 ; then
|
||||||
|
PREFIX=$1
|
||||||
|
else
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing to $PREFIX"
|
||||||
|
|
||||||
INSTALL=${INSTALL:=install -c}
|
INSTALL=${INSTALL:=install -c}
|
||||||
STRIP=${STRIP:=strip}
|
STRIP=${STRIP:=strip}
|
||||||
|
|
||||||
# Install commands and example config to target directory
|
|
||||||
PREFIX=$1
|
|
||||||
|
|
||||||
echo "Installing to $PREFIX"
|
|
||||||
|
|
||||||
test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
|
test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
|
||||||
" You need to build first (type 'make')."
|
" You need to build first (type 'make')."
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user