# Maintainer: Andreas Grapentin <oaken-source@parabola.nu>

_pkgname=PyWebDAV3
pkgname=(python{,2}-${_pkgname,,})
pkgver=0.9.12
pkgrel=1
pkgdesc="WebDAV library including a standalone server for python"
arch=(any)
url=http://code.google.com/p/pywebdav/
license=(GPL3)

_depends=()
makedepends=(python{,2}-setuptools)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('866143ccc863283b3163b9022a15cd04aed8e736ac22204f3488d41944b7265e')

_package() {
  depends=("$1" "${_depends[@]/#/$1-}")
  provides=("$1-pywebdav")
  replaces=("$1-pywebdav")
  cd "$srcdir"/$_pkgname-$pkgver
  $1 setup.py install --root="$pkgdir"
}

for _pkg in "${pkgname[@]}"; do
  eval "package_$_pkg () { _package ${_pkg%%-*}; }"
done
