Parent: [78cd08] (diff)

Child: [b52f7a] (diff)

Download this file

recollinstall.in    63 lines (50 with data), 1.6 kB

#!/bin/sh
# Install recoll files.

fatal()
{
    echo $*
    exit 1
}
usage()
{
    fatal 'Usage: recollinstall [<prefixdir>], ie: recollinstall /usr/local'
}

if test $# -eq 0 ; then
   PREFIX=@prefix@
elif test $# -eq 1 ; then
   PREFIX=$1
else
   usage
fi

echo "Installing to $PREFIX"
test -n "$bindir" || bindir=$PREFIX/bin
test -n "$datadir" || datadir=$PREFIX/share
test -n "$mandir" || mandir=$PREFIX/man

INSTALL=${INSTALL:=install -c}
STRIP=${STRIP:=strip}

test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
     " You need to build first (type 'make')."

for d in \
    ${bindir} \
    ${mandir}/man1 \
    ${mandir}/man5 \
    ${datadir}/recoll/examples \
    ${datadir}/recoll/filters \
    ${datadir}/recoll/images \
    ${datadir}/recoll/translations
do
    test -d $d || mkdir -p $d || exit 1
done

${INSTALL} doc/user/usermanual.html doc/user/docbook.css ${datadir}/recoll/doc 

${INSTALL} doc/man/recoll.1 doc/man/docbook.css ${mandir}/man1
${INSTALL} doc/man/recoll.conf.5  ${mandir}/man5

${INSTALL} qtgui/recoll index/recollindex ${bindir} || exit 1
${STRIP} ${bindir}/recoll ${bindir}/recollindex

${INSTALL} filters/rcl* ${datadir}/recoll/filters/ || exit 1
chmod a+x ${datadir}/recoll/filters/rcl* || exit 1
# Clean up possible old filters in examples
rm -f ${datadir}/recoll/examples/rcl*

${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \
		    ${datadir}/recoll/examples/ || exit 1

${INSTALL} qtgui/mtpics/*.png ${datadir}/recoll/images || exit 1
${INSTALL} qtgui/recoll*.qm ${datadir}/recoll/translations || exit 1