# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maciej Sitarz <macieks@freesco.pl>

pkgname=mythes-pl
epoch=1
pkgver=0.8.67
pkgrel=2
pkgdesc='Polish thesaurus'
arch=('any')
url='https://dobryslownik.pl/pobierz/'
license=('LGPL')
optdepends=('libmythes: offers thesaurus library functions')
source=(https://sources.archlinux.org/other/community/mythes-pl/pl-dict-latest-0.8.67.oxt)
sha256sums=('1b3947ebecea662431f9b620f63a4fdaa3fc647677384fe5f5e69c11b95ef31c')

package() {
  install -dm755 "$pkgdir"/usr/share/mythes
  install -m644 th_pl_PL_v2.* "$pkgdir"/usr/share/mythes

  # 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
}
