# Maintainer: Xeonacid <h.dwwwwww@gmail.com>

_name=certomancer_csc_dummy
pkgname=python-certomancer-csc-dummy
pkgver=0.4.2
pkgrel=2
pkgdesc="A Certomancer-based demo CSC server for integration tests"
arch=(any)
url="https://github.com/MatthiasValvekens/${_name}"
license=(MIT)
depends=(python python-asn1crypto python-cryptography certomancer python-aiohttp python-pae)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha512sums=('4d34402e1d4e13a4089282bc95e3fa8c4867f1377404de29544828eb64c8e7e3adb0212215640a0dda3d8a41f0651f5b3e2b9a5cbea841ab6f9f0c97f4b36e90')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}
