# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=xandikos
pkgver=0.2.6
pkgrel=1
pkgdesc='Lightweight yet complete CardDAV/CalDAV server that backs onto a Git repository'
arch=('any')
url=https://www.xandikos.org/
license=('GPL3')
depends=('python-aiohttp' 'python-defusedxml' 'python-dulwich'
         'python-icalendar' 'python-jinja' 'python-multidict')
makedepends=('python-setuptools')
optdepends=('python-prometheus_client: for metrics with the standalone server'
            'uwsgi-plugin-python: for the WSGI interface')
source=("https://files.pythonhosted.org/packages/source/x/xandikos/xandikos-$pkgver.tar.gz")
sha256sums=('6b58fbcb2f8c2a0fc2e1f8508160443a46b3db9bf577d0ce5548689138816e23')
b2sums=('ff7ffe1b5816719eebaaff46ea831a65ffc4342e26df3f3a80aa65eed4f29b57b69411a06f7f9938cf1bb5bc763830dea5e72878449fae5014f14e36068c0fe6')

build() {
  cd xandikos-$pkgver
  python setup.py build
}

check() {
  cd xandikos-$pkgver
  python -m unittest xandikos.tests.test_suite
}

package() {
  cd xandikos-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 -t "$pkgdir"/usr/share/doc/xandikos README.rst
  install -Dm644 -t "$pkgdir"/usr/share/doc/xandikos/examples examples/*
}

# vim:set ts=2 sw=2 et:
