NAME="aspell"
DESC="Interactive spell checking program and the Aspell libraries"
VERSION="0.60.8"
FILES=("https://ftp.gnu.org/gnu/aspell/aspell-$VERSION.tar.gz")
HASHES=("012fa9209203ae4e5a61c2a668fd10e3")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  ./configure --prefix=/usr
  make && make DESTDIR="$ROOTDIR" install

  ln -svfn aspell-${VERSION%.*} "$ROOTDIR/usr/lib/aspell"
  install -v -m755 -d "$ROOTDIR/usr/share/doc/aspell-$VERSION/aspell"{,-dev}.html
  install -v -m644 manual/aspell.html/* \
    "$ROOTDIR/usr/share/doc/aspell-$VERSION/aspell.html"
  install -v -m644 manual/aspell-dev.html/* \
    "$ROOTDIR/usr/share/doc/aspell-$VERSION/aspell-dev.html"

  cd .. && rm -r $NAME-$VERSION
}

INSTALL(){
  echo "!! Install dictionaries from https://ftp.gnu.org/gnu/aspell/dict in order to use aspell !!"
  exit 0
}
