summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e2b7d4cd9f6bb40bc29fcf14b03bac218d32aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>

pkgname=todoman-git
_pkgname=todoman
pkgver=4.1.1.dev19+g249f124
pkgrel=1
pkgdesc="A simple CalDav-based todo manager."
arch=("any")
url="https://github.com/pimutils/todoman"
license=('ISC')
makedepends=(
  git
  python-build
  python-installer
  python-setuptools-scm
)
depends=(
  python-atomicwrites
  python-click
  python-click-log
  python-dateutil
  python-humanize
  python-icalendar
  python-parsedatetime
  python-tabulate
  python-urwid
  python-xdg
)
optdepends=('python-click-repl: the repl command.'
            'bash-completion: bash autocompletion.'
            'zsh-completions: zsh autocompletion.')
checkdepends=('python-pytest' 'python-hypothesis' 'python-pytest-runner'
              'python-freezegun' 'python-pytest-cov')
conflicts=("todoman")
provides=("todoman")
source=(git+https://github.com/pimutils/todoman.git)
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  python -m setuptools_scm 2> /dev/null
}

build() {
  cd "$srcdir/$_pkgname"
  python -m build --wheel --no-isolation
}

check() {
  cd "$srcdir/$_pkgname"

  export PYTHONPATH="${PYTHONPATH%:}:${PWD}"
  export TZ=UTC
  python -m pytest
}

package() {
  cd "$srcdir/$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 config.py.sample \
    "$pkgdir/usr/share/doc/todoman/examples/config.py"

  install -Dm 755 bin/todo "$pkgdir/usr/bin/todo"

  install -Dm 644 contrib/completion/bash/_todo \
    "$pkgdir/usr/share/bash-completion/completions/todo"

  install -Dm 644 contrib/completion/zsh/_todo \
    "$pkgdir/usr/share/zsh/site-functions/_todo"
}