Parent:
[5a1db8]
(diff)
Child:
[bae94f]
(diff)
Download this file
recollinstall.in
96 lines (79 with data), 2.5 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
QTGUI=@QTGUI@
I18N=${QTGUI}/i18n
test -n "$bindir" || bindir=${PREFIX}/bin
test -n "$datadir" || datadir=${PREFIX}/share
if test -z "$mandir" ; then
if test -d ${PREFIX}/man ; then
mandir=${PREFIX}/man
else
mandir=${datadir}/man
fi
fi
if test -n "$DESTDIR" ; then
PREFIX=$DESTDIR/$PREFIX
bindir=$DESTDIR/$bindir
datadir=$DESTDIR/$datadir
mandir=$DESTDIR/$mandir
fi
echo "Installing to $PREFIX"
# Note: solaris 'install' does not understand -v
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}/applications \
${datadir}/icons \
${datadir}/recoll/doc \
${datadir}/recoll/examples \
${datadir}/recoll/filters \
${datadir}/recoll/images \
${datadir}/recoll/translations \
${datadir}/icons/hicolor/48x48/apps
do
test -d $d || mkdir -p $d || exit 1
done
# Use the xdg utilies to install the desktop file and icon
PATH=$PATH:desktop/xdg-utils-1.0.1/scripts
export PATH
xdg-desktop-menu install desktop/recoll-searchgui.desktop
xdg-icon-resource install --size 48 desktop/recoll-searchgui.png
${INSTALL} -m 0444 doc/user/usermanual.html doc/user/docbook.css \
${datadir}/recoll/doc
${INSTALL} -m 0444 doc/man/recoll.1 doc/man/recollindex.1 ${mandir}/man1/
${INSTALL} -m 0444 doc/man/recoll.conf.5 ${mandir}/man5/
${INSTALL} -m 0755 ${QTGUI}/recoll index/recollindex ${bindir} || exit 1
${STRIP} ${bindir}/recoll ${bindir}/recollindex
${INSTALL} -m 0755 filters/rcl* ${datadir}/recoll/filters/ || exit 1
${INSTALL} -m 0755 desktop/xdg-utils-1.0.1/scripts/xdg-open \
${datadir}/recoll/filters/ || exit 1
${INSTALL} -m 0444 \
sampleconf/mimeconf \
sampleconf/mimeview \
sampleconf/recoll.conf \
sampleconf/mimemap \
${datadir}/recoll/examples/ || exit 1
${INSTALL} -m 0755 index/rclmon.sh ${datadir}/recoll/examples/ || exit 1
${INSTALL} -m 0444 ${QTGUI}/mtpics/*.png ${datadir}/recoll/images || exit 1
${INSTALL} -m 0444 ${I18N}/recoll*.qm ${datadir}/recoll/translations || exit 1