# $Id: PKGBUILD 110194 2014-04-26 18:33:23Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maciej Sitarz <macieks@freesco.pl>

pkgname=hyphen-pl
pkgver=20081206
pkgrel=2
pkgdesc='Polish hyphenation rules'
arch=('any')
url='http://extensions.services.openoffice.org/en/project/pl-dict'
license=('LGPL')
optdepends=('hyphen: offers hyphenation library functions')
source=(ftp://ftp.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
md5sums=('7ecdc3975750d6d2de1e6045f5003ed4'
         'SKIP')

package() {
  cd $pkgname-$pkgver

  install -Dm644 hyph_pl_PL.dic "$pkgdir"/usr/share/hyphen/hyph_pl_PL.dic

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