# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Ian Denhardt <ian@zenhack.net>

_pkgname=urwidtrees
pkgname=python-urwidtrees
pkgver=1.0.4
pkgrel=1
pkgdesc="Tree widgets for urwid."
arch=(any)
url="https://github.com/pazz/$_pkgname"
license=(GPL3)
makedepends=(python-setuptools python-sphinx)
depends=(python 'python-urwid>=1.1.0')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/pazz/$_pkgname/archive/$pkgver.tar.gz")
sha256sums=('db7344de2c03257698c9fc12f140d46cee505241b0df378e6f76925d22c32eaa')

build() {
	cd "$srcdir/$_pkgname-$pkgver"
	python setup.py build
	make SPHINXBUILD=sphinx-build -C docs man html
}

package_python-urwidtrees() {
	cd "$srcdir/$_pkgname-$pkgver"

	python setup.py install --optimize=1 --root="$pkgdir"

	install -dm755 "$pkgdir/usr/share/doc/$pkgname"
	cp -a docs/build/html/* "$pkgdir/usr/share/doc/$pkgname"
}
