upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / khard / trunk / PKGBUILD
blobd1b363df186dd9b4a8222e27578d08999e1ae4b6
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
4 pkgname=khard
5 pkgver=0.18.0
6 pkgrel=2
7 pkgdesc="Console address book manager"
8 arch=('any')
9 url="https://github.com/lucc/khard"
10 license=('GPL3')
11 depends=('python-atomicwrites' 'python-configobj' 'python-ruamel-yaml'
12          'python-unidecode' 'python-vobject')
13 makedepends=('python-build' 'python-installer' 'python-setuptools-scm'
14              'python-sphinx' 'python-sphinx-autoapi'
15              'python-sphinx-autodoc-typehints' 'python-wheel')
16 checkdepends=('python-pytest')
17 optdepends=('vdirsyncer: Synchronization of address books with a DAV server'
18             'diffutils: Using sdiff_khard_wrapper.sh')
19 source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
20 sha256sums=('fe88d4b47fdd948610ac573c01fa13d1b7996265cbc44391085761af9a030615')
21 b2sums=('856190b5972c6b912977a69a4786779d59fafbdea1bc323c8ca8af56c7ce33e09efbe58734db261437ea0e654a8457086174becedb76dacf802f975847e03c63')
23 build() {
24   cd "$pkgname-$pkgver"
25   python -m build --wheel --skip-dependency-check --no-isolation
26   make -C doc man
29 check() {
30   cd "$pkgname-$pkgver"
31   pytest -v
34 package() {
35   cd "$pkgname-$pkgver"
36   python -m installer --destdir="$pkgdir" dist/*.whl
37   # additional wrapper script
38   install -vDm 755 "misc/sdiff/sdiff_${pkgname}_wrapper.sh" \
39     "${pkgdir}/usr/lib/${pkgname}/sdiff_${pkgname}_wrapper.sh"
40   # twinkle integration
41   install -vDm 644 misc/twinkle/scripts/*.py \
42     -t "${pkgdir}/usr/share/${pkgname}/twinkle/scripts/"
43   install -vDm 644 misc/twinkle/sounds/*.ogg \
44     -t "${pkgdir}/usr/share/${pkgname}/twinkle/sounds/"
45   # zsh
46   install -vDm 644 "misc/zsh/_"*"${pkgname}" \
47     -t "${pkgdir}/usr/share/zsh/site-functions/"
48   # docs
49   install -vDm 644 {CHANGES,CONTRIBUTING.rst,README.md} \
50     -t "${pkgdir}/usr/share/doc/${pkgname}/"
51   # man
52   install -vDm 644 "doc/build/man/${pkgname}.1" \
53     -t "${pkgdir}/usr/share/man/man1"
54   install -vDm 644 "doc/build/man/${pkgname}.conf.5" \
55     -t "${pkgdir}/usr/share/man/man5"