summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 01701bc3161fbecd64137298f72869aeb6a16830 (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
# Maintainer: Simon Brulhart <simon@brulhart.me>

pkgname=python-taxi
pkgver=6.3.1
pkgrel=1
pkgdesc="Timesheeting tool that focuses on simplicity"
arch=('any')
license=('custom')
url="https://github.com/sephii/taxi"
depends=('python-appdirs' 'python-click')
makedepends=('python' 'python-flit' 'python-installer')
optdepends=("python-taxi-zebra: Zebra backend for Taxi")
source=(
  "$pkgname-$pkgver.tar.gz::https://github.com/sephii/taxi/archive/$pkgver.tar.gz"
  taxi-complete.bash
  taxi-complete.zsh
)
sha512sums=('fb1ab86d06b3272f9cdec3f22298b0b5353e6efd489f6941da88b5f28c8584f6b91c9280d2ab6fdda0a063fb5e1f444b33f0947830ebd8fbcb879ca143316254'
            '646ac547f52fb9a1c8498a9d1d431a3c19b41faacd86b7344ffb8c2334e6b01b765945882e5180c7f658b8c3f6a7887a690171b624326b5b3fa3ecda59344ccc'
            'd02c0e3489dba8841eff335571088b739911d4c541623971cfef9b1628ea6960ad748e1e6c4cc1dfdd20dc88fc289f8078dbb51fa0402eed4868c45e87f4106a')

build() {
  cd "$srcdir/taxi-$pkgver"
  flit build --no-use-vcs
}

package() {
  cd "$srcdir/taxi-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  cd "$srcdir"
  # Completion file is generated by running `_TAXI_COMPLETE=source taxi > taxi-complete.bash`
  install -Dm644 taxi-complete.bash "$pkgdir"/usr/share/bash-completion/completions/taxi
  # Completion file is generated by running `_TAXI_COMPLETE=source_zsh taxi > taxi-complete.zsh`
  # and adding `#compdef taxi` on the first line
  install -Dm644 taxi-complete.zsh "$pkgdir"/usr/share/zsh/site-functions/_taxi
}