# This package author uses `make install` as `make` + `make install`

#
# Note: After almost two months of banging my head against a
#	firm, wall I am ignoring the author's Makefile.
#

cd $SOURCE_DIRECTORY &&

# Create any needed directories
mkdir -vp $INSTALL_ROOT{/usr/bin,/usr/share/texmf/tex/latex/$SPELL,/usr/share/doc/$SPELL,/usr/share/info,/usr/share/man/man1} &&

# Install script, tex, docs.
sed  -i -e 's#/usr/local#/usr#g' latex2man &&
cp $SPELL $INSTALL_ROOT/usr/bin &&

cp -vf $SPELL.{cfg,sty} $INSTALL_ROOT/usr/share/texmf/tex/latex/$SPELL &&
cp -vf $SPELL.1 $INSTALL_ROOT/usr/share/man/man1 &&
cp -vf latex2man.{html,pdf,tex,txt,trans,texi} $INSTALL_ROOT/usr/share/doc/$SPELL &&

cp -vf README $INSTALL_ROOT/usr/share/doc/$SPELL &&

# and info (taken from the package author's Makefile)
if is_depends_enabled $SPELL texinfo; then
  cp -vf $SPELL.info $INSTALL_ROOT/usr/share/info &&
  install-info $SPELL.info $INSTALL_ROOT/usr/share/info/dir
fi
