summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3639e697709e14a49b93382e69e293ca20e9a6c (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
pkgname="timedctl"
pkgver=5.9.3
pkgrel=2
pkgdesc="Click CLI for Timed using libtimed"
arch=("any")
url="https://github.com/adfinis/timedctl.git"
license=("AGPL3")
provides=("timedctl")
conflicts=("timedctl")
depends=("python>=3.10" "python-click>=8.1.3" "python-pyfzf>=0.3.1" "python-rich>=13.4.2" "python-libtimed>=0.6.4" "python-tomlkit>=0.11.8" "python-click-aliases>=1.0.1" "fzf>=0.42.0")
makedepends=("python-poetry" "python-installer" "git")
source=("git+${url}")
sha256sums=('SKIP')

pkgver(){
  cd "${srcdir}/timedctl"
  git describe --tags --long | sed 's/v//;s/-/.r/;s/-/./g'
}

build() {
  cd "${srcdir}/timedctl"
  poetry install
  poetry build
}

package() {
  cd "${srcdir}/timedctl"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  _TIMEDCTL_COMPLETE=bash_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/timedctl.bash"
  _TIMEDCTL_COMPLETE=fish_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/timedctl.fish"
  _TIMEDCTL_COMPLETE=zsh_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_timedctl"
}