# $Id: PKGBUILD 151536 2012-02-27 15:24:52Z pierre $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=mythes-hu
pkgver=1.0
pkgrel=2
pkgdesc="Hungarian thesaurus"
arch=('any')
url="http://extensions.services.openoffice.org/project/hu_dicts"
license=('GPL')
optdepends=('libmythes: offers thesaurus library functions')
source=("http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/OpenOffice/contrib/dictionaries/thes_hu_HU.zip")
md5sums=('20e4bfe680999629270e1e8b7e2534e5')

package() {
  cd "$srcdir"
  install -Dm644 th_hu_HU.dat $pkgdir/usr/share/mythes/th_hu_HU.dat
  install -Dm644 th_hu_HU.idx $pkgdir/usr/share/mythes/th_hu_HU.idx

  # the symlinks
  install -dm755 ${pkgdir}/usr/share/myspell/dicts
  pushd $pkgdir/usr/share/myspell/dicts
    for file in $pkgdir/usr/share/mythes/*; do
      ln -sv /usr/share/mythes/$(basename $file) .
    done
  popd

  install -Dm644 README_th_hu_HU.txt $pkgdir/usr/share/doc/$pkgname/README_th_hu_HU.txt
}
