# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Contributor: birdflesh <antkoul at gmail dot com>

pkgname=hunspell-el
pkgver=0.9
pkgrel=2

pkgdesc="Greek hunspell dictionary"
url="http://elspell.math.upatras.gr"
arch=(any)
license=('MPL' 'GPL' 'LGPL')

optdepends=('hunspell: the spell checking libraries and apps')

source=("http://elspell.math.upatras.gr/files/ooffice/el_GR-$pkgver.zip" LICENSE)

sha1sums=('c1b2539b3e18d78f7408db820bf834aaffff21ea'
          'b50c7273708dfaec427414edaeb090fe80870fa4')

package() {
	install -dm755 "$pkgdir"/usr/share/hunspell
	install -m644 el_GR.aff "$pkgdir/usr/share/hunspell"
	install -m644 el_GR.dic "$pkgdir/usr/share/hunspell"

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

	# docs
	install -Dm644 README_el_GR.txt "$pkgdir"/usr/share/doc/"$pkgname"
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
