fixed installation script
This commit is contained in:
parent
fa34ad8342
commit
e23efbd2b6
40
src/Makefile
40
src/Makefile
@ -1,26 +1,34 @@
|
|||||||
|
PREFIX=/usr/local
|
||||||
|
INSTALL = install -c
|
||||||
|
|
||||||
all: mk/sysconf
|
all: mk/sysconf
|
||||||
cd lib; $(MAKE)
|
cd lib; ${MAKE}
|
||||||
cd bincimapmime; $(MAKE)
|
cd bincimapmime; ${MAKE}
|
||||||
cd index; $(MAKE)
|
cd index; ${MAKE}
|
||||||
cd qtgui; qmake recoll.pro; rm -f recoll; $(MAKE)
|
cd qtgui; qmake recoll.pro; rm -f recoll; ${MAKE}
|
||||||
|
|
||||||
mk/sysconf:
|
mk/sysconf:
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
static:
|
static:
|
||||||
rm -f index/recollindex qtgui/recoll
|
rm -f index/recollindex qtgui/recoll
|
||||||
cd lib; $(MAKE)
|
cd lib; ${MAKE}
|
||||||
cd bincimapmime; $(MAKE)
|
cd bincimapmime; ${MAKE}
|
||||||
cd index; $(MAKE) BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic
|
cd index; ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic
|
||||||
cd qtgui; qmake recoll.pro; $(MAKE) BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic
|
cd qtgui; qmake recoll.pro; ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd common; $(MAKE) clean
|
cd common; ${MAKE} clean
|
||||||
cd index; $(MAKE) clean
|
cd index; ${MAKE} clean
|
||||||
cd lib; $(MAKE) clean
|
cd lib; ${MAKE} clean
|
||||||
cd bincimapmime; $(MAKE) clean
|
cd bincimapmime; ${MAKE} clean
|
||||||
cd qtgui; rm -f recoll; $(MAKE) clean
|
cd qtgui; rm -f recoll; ${MAKE} clean
|
||||||
cd query; $(MAKE) clean
|
cd query; ${MAKE} clean
|
||||||
cd utils; $(MAKE) clean
|
cd utils; ${MAKE} clean
|
||||||
rm -rf qtgui/Makefile qtgui/preview/Makefile
|
rm -f qtgui/Makefile qtgui/preview/Makefile
|
||||||
|
|
||||||
|
install: all
|
||||||
|
./recollinstall ${PREFIX}
|
||||||
|
|
||||||
|
installme:
|
||||||
|
./recollinstall
|
||||||
|
|||||||
@ -10,3 +10,4 @@ BIGLIB = ../lib/librcl.a
|
|||||||
MIMELIB = ../bincimapmime/libmime.a
|
MIMELIB = ../bincimapmime/libmime.a
|
||||||
RANLIB = test -f
|
RANLIB = test -f
|
||||||
|
|
||||||
|
INSTALL = install -c
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Install recoll files. This has 2 modes, for installing the binaries or
|
||||||
|
# the personal configuration files
|
||||||
|
|
||||||
fatal()
|
fatal()
|
||||||
{
|
{
|
||||||
echo $*
|
echo $*
|
||||||
@ -7,66 +10,65 @@ fatal()
|
|||||||
}
|
}
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
fatal 'installrecoll <targetdir>, ie: installrecoll /usr/local'
|
echo 'Usage (binaries): installrecoll <dir>, ie: installrecoll /usr/local'
|
||||||
}
|
fatal 'Usage (personal config): installrecoll'
|
||||||
install()
|
|
||||||
{
|
|
||||||
src=$1
|
|
||||||
dst=$2
|
|
||||||
if test -d $dst; then dst=$2/`basename $1`;fi
|
|
||||||
if test -f $dst; then
|
|
||||||
bak=$dst.prev
|
|
||||||
#echo "Preserving $dst as $bak"
|
|
||||||
(install $dst $bak)
|
|
||||||
fi
|
|
||||||
echo $src '->' $dst
|
|
||||||
cp $src $dst
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if test $# != 1 ; then
|
INSTALL=${INSTALL:=install}
|
||||||
usage
|
|
||||||
fi
|
|
||||||
targetdir=$1
|
|
||||||
|
|
||||||
echo "Installing binaries to $targetdir"
|
if test $# = 1 ; then
|
||||||
|
# Install commands and example config to target directory
|
||||||
|
PREFIX=$1
|
||||||
|
|
||||||
test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
|
echo "Installing to $PREFIX"
|
||||||
" You need to build first."
|
|
||||||
|
test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
|
||||||
|
" You need to build first."
|
||||||
|
|
||||||
|
test -d ${PREFIX}/bin || mkdir ${PREFIX}/bin || exit 1
|
||||||
|
${INSTALL} qtgui/recoll index/recollindex recollinstall $PREFIX/bin \
|
||||||
|
|| exit 1
|
||||||
|
test -d ${PREFIX}/share || mkdir ${PREFIX}/share
|
||||||
|
test -d ${PREFIX}/share/examples || mkdir ${PREFIX}/share/examples
|
||||||
|
test -d ${PREFIX}/share/examples/recoll || \
|
||||||
|
mkdir ${PREFIX}/share/examples/recoll
|
||||||
|
${INSTALL} filters/rcl* ${PREFIX}/share/examples/recoll || exit 1
|
||||||
|
${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \
|
||||||
|
${PREFIX}/share/examples/recoll || exit 1
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
if test -d $targetdir/bin -a -w $targetdir/bin ; then
|
|
||||||
install qtgui/recoll $targetdir/bin/recoll
|
|
||||||
install index/recollindex $targetdir/bin/recollindex
|
|
||||||
else
|
else
|
||||||
echo "Not installing binary executables to $targetdir/bin which is not writable"
|
|
||||||
echo "Going on with personal install"
|
|
||||||
fi
|
|
||||||
|
|
||||||
me=`whoami`
|
# Install configuration files to home directory
|
||||||
if test "$me" != root ; then
|
PREFIX=${PREFIX:=/usr/local}
|
||||||
|
|
||||||
|
me=`whoami`
|
||||||
|
if test "$me" = root ; then
|
||||||
|
fatal "Cowardly refusing to install personal config in root's" \
|
||||||
|
"home directory"
|
||||||
|
fi
|
||||||
|
if test ! -d ${PREFIX}/share/examples/recoll ; then
|
||||||
|
fatal "Global install should be performed first"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -d $HOME/.recoll ; then
|
if test -d $HOME/.recoll ; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
$HOME/.recoll already exists, no modification done.
|
$HOME/.recoll already exists, no modification done.
|
||||||
You should check for new filters in the filters/ directory, and
|
You should check for new filters or updated files in
|
||||||
for modifications to files in the sampleconf/ directory (ie new
|
${PREFIX}/share/examples/recoll.
|
||||||
mime types in mimemap).
|
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir $HOME/.recoll || exit 1
|
mkdir $HOME/.recoll || exit 1
|
||||||
cp filters/rcl* $HOME/.recoll
|
cp ${PREFIX}/share/examples/recoll/* $HOME/.recoll
|
||||||
chmod a+x $HOME/.recoll/rcl*
|
chmod a+x $HOME/.recoll/rcl*
|
||||||
cd sampleconf
|
|
||||||
cp mimeconf mimemap recoll.conf $HOME/.recoll
|
|
||||||
chmod +w $HOME/.recoll/recoll.conf
|
chmod +w $HOME/.recoll/recoll.conf
|
||||||
chmod +w $HOME/.recoll/mimeconf
|
chmod +w $HOME/.recoll/mimeconf
|
||||||
|
|
||||||
|
echo Copied configuration files and filters to $HOME/.recoll/
|
||||||
echo You should now take a look at $HOME/.recoll/recoll.conf
|
echo You should now take a look at $HOME/.recoll/recoll.conf
|
||||||
|
exit 0
|
||||||
else
|
|
||||||
|
|
||||||
echo "Not installing personal configuration for root user"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user