# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-runstatus
_pkgname=runstatus
pkgver=1.0
pkgrel=0
pkgdesc="A Python library to detect program states"
url="https://github.com/riquito/runstatus/"
arch="noarch"
license="Apache-2.0"
depends="python2"
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="9d0f3ff2ff68dd4eb3d20d9a65438961  runstatus-1.0.tar.gz"
sha256sums="e190208683dfa6ef8964e847ead7db3ca203dc17fc09ebfb95544b278d0f082f  runstatus-1.0.tar.gz"
sha512sums="aaca6c7ae023969baeabd2bcd9a3f5016db449ebf76d7b0a85f2b9198e645a77065bf89d259a52ad2c3fefb90a32bf5900d0496a6d0c33cbbf310fc88ab3baeb  runstatus-1.0.tar.gz"
