# repolint: reason=asdeps

_pkgname=zbase32
pkgname=(python2-$_pkgname)
pkgver=1.1.5
pkgrel=1
pkgdesc="base32 encoder/decoder"
arch=('i686' 'x86_64')
url="http://pypi.python.org/pypi/zbase32"
license=(BSD)

makedepends=(python2-setuptools python2-pyutil)
source=("https://pypi.python.org/packages/source/z/zbase32/zbase32-$pkgver.tar.gz")
sha256sums=('9b25c34ba586cbbad4517af516e723599a6f38fc560f4797855a5f3051e6422f')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py build
}

check() {
  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py test
}

_package() {
  depends=($1 $1-pyutil)
  cd "$srcdir"/$_pkgname-$pkgver
  $1 setup.py install --root="$pkgdir"
  install -Dm644 PKG-INFO* $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

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