# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-sphinxcontrib-gravatar
_pkgname=sphinxcontrib-gravatar
pkgver=0.1.0
pkgrel=0
pkgdesc="Sphinx gravatar extension"
url="https://pypi.python.org/pypi/sphinxcontrib-gravatar"
arch="noarch"
license="BSD"
depends="python2 py-sphinx"
depends_dev=""
makedepends="python2-dev py-setuptools"
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="5e30b438dd76e15a8a8ddf4a87422101  sphinxcontrib-gravatar-0.1.0.tar.gz"
sha256sums="055665d3536345d4c2d7e3d6d11a22be0bb773124f8cdbdd3adc22d2f65c43e7  sphinxcontrib-gravatar-0.1.0.tar.gz"
sha512sums="2e59b7c47b6c5f3e90880f1e32ad4e42e70bc3498edd3f3630256fc28f921c2cac1881001b960206f95b39cb970f097c97a2de0eaff27d3afb3b4c20e78933b8  sphinxcontrib-gravatar-0.1.0.tar.gz"
