packager="Great-OS Team"
maintainer="sipo"

description="Spell checker and morphological analyzer library and program"
url="https://hunspell.github.io/"

name=hunspell
version=1.7.2
release=2

source=(https://github.com/hunspell/hunspell/archive/v$version.tar.gz)

prepare(){

  cd hunspell-$version
  autoreconf -vfi
}

build() {

  cd hunspell-$version
  ./configure --prefix=/usr \
              --disable-static \
              --with-ui \
	      --with-readline
  make
}

package() {

  cd hunspell-$version
  make DESTDIR="$PKG" install
  
  # add generic hunspell.so for development and projects not using pkgconfig flags - FS#30592
  pushd $PKG/usr/lib
  ln -s libhunspell-?.?.so libhunspell.so
  popd

# Obsolet lib
  rm $PKG/usr/lib/libhunspell-1.?.la
}
