# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-enchant
_pkgname=pyenchant
pkgver=1.6.6
pkgrel=0
pkgdesc="A spellchecking library for Python"
url="http://pythonhosted.org/pyenchant/"
arch="noarch"
license="LGPL-2.0-or-later"
depends="python2"
depends_dev=""
makedepends="python2-dev py-setuptools enchant-dev"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python2 setup.py build || return 1
}

package() {
	cd "$_builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

md5sums="9f5acfd87d04432bf8df5f9710a17358  pyenchant-1.6.6.tar.gz"
sha256sums="25c9d2667d512f8fc4410465fdd2e868377ca07eb3d56e2b6e534a86281d64d3  pyenchant-1.6.6.tar.gz"
sha512sums="af6aa1ac77b5718ec4b4aad3d0b88d26e697b472ec8261b23b37fdbf6b399a120ccc3e4ee6579b884c44b0eeb3f95bcdbceea189105c05088a48400a0c8cdb90  pyenchant-1.6.6.tar.gz"
