# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=py-django-haystack
pkgver=2.8.0
pkgrel=0
pkgdesc="Modular search for Django"
url=http://haystacksearch.org/
arch=noarch
license=BSD
depends=py-django
makedepends=py-setuptools
source="https://files.pythonhosted.org/packages/source/d/django-haystack/django-haystack-$pkgver.tar.gz"

_builddir=$srcdir/django-haystack-$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
}

package() {
	cd "$_builddir"
	python2 setup.py install --root "$pkgdir"
}

sha512sums="cba543d372c6bd9dc28bf1c284f85f8d3b211c24223dfa0b1b6d472a1584ff72c4b6a3891c0193c64aa04bf76c9b3093dba99c92de69b4f8e438e3b43fd20a33  django-haystack-2.8.0.tar.gz"
