summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a5588f554e848d1a29675e7c1532c5d4eed016a (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
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>

pkgname=barpyrus-git
_pkgname=${pkgname%-git}
pkgver=r117.a50f18b
pkgrel=4
pkgdesc="A python wrapper for lemonbar/conky"
arch=(any)
url="https://github.com/t-wissmann/barpyrus"
license=('BSD')
depends=('python' 'python-setuptools' 'lemonbar')
optdepends=(
  'conky: To use the conky widget'
  'siji-git: Default symbol font'
  'herbstluftwm: Default WM integration'
  'python-pytz: To use `tz_name` for `widgets.DateTime`'
  'python-xlib: To use the trayer integration'
  'trayer: To use the trayer integration'
  'playerctl: To use the playerctl integration'
)
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
source=("git+https://github.com/t-wissmann/barpyrus.git")
sha1sums=('SKIP')

prepare() {
  # https://github.com/pypa/setuptools/issues/1347
  git -C "$_pkgname" clean -dfx
}

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

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

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

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