# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-bottle-servefiles
_pkgname=bottle-servefiles
pkgver=0.1.2
pkgrel=0.dev
pkgdesc="Bottle plugin for serving files"
url="https://bitbucket.org/rudylattae/bottle-servefiles"
arch="noarch"
license="BSD"
depends="python2 py-bottle"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-${pkgver}dev.zip"

_builddir="$srcdir"/$_pkgname-${pkgver}dev
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="7f0f2e2df7cd99858d58abefb26eb6a3  bottle-servefiles-0.1.2dev.zip"
sha256sums="163f182a224c6b4bce47284948d8d7d747662d9da63becf76b4a543f824a2ca0  bottle-servefiles-0.1.2dev.zip"
sha512sums="9a5976abf3e562c8d77b0e4805ba62bbf9ae0796c2af661b1715415fca4a5680beb8bdea80a8600bba0aa891f0a2a94b8e72b5358a91ca58a53399525de25477  bottle-servefiles-0.1.2dev.zip"
