# $Id: PKGBUILD 126516 2015-01-24 10:26:15Z andrea $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=mythes-hu
pkgver=20101019
pkgrel=1
pkgdesc="Hungarian thesaurus"
arch=('any')
url="http://extensions.openoffice.org/en/project/hungarian-dictionary-pack"
license=('GPL')
optdepends=('libmythes: offers thesaurus library functions')
source=(http://downloads.sourceforge.net/project/aoo-extensions/1283/9/dict-hu.oxt)
md5sums=('d320e43e815c2dfd599dbfb7cd0e41fb')

package() {
  cd "$srcdir"
  install -Dm644 th_hu_HU_v2.dat $pkgdir/usr/share/mythes/th_hu_HU_v2.dat
  install -Dm644 th_hu_HU_v2.idx $pkgdir/usr/share/mythes/th_hu_HU_v2.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_v2.txt $pkgdir/usr/share/doc/$pkgname/README_th_hu_HU_v2.txt
}
