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

pkgname=xandikos
pkgver=0.1.0
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-defusedxml' 'python-dulwich' 'python-icalendar' 'python-jinja')
makedepends=('python-setuptools')
optdepends=('uwsgi-plugin-python: to run in production')
source=("https://files.pythonhosted.org/packages/source/x/xandikos/xandikos-$pkgver.tar.gz")
sha512sums=('d47ef8b12c7d33efc6eeb04eb8ecc599fb87d9bb8970eee328d43c8e3cf692716e4ee5c2ba6804bdd6a57b457169e33835abf7ecd42c2f9d039990e5e09b4e1b')

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/*
  install -Dm644 -t "$pkgdir"/usr/share/man/man1 xandikos.1
}

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