summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7504cf5a050f808c6fc48d156e6c2a7f319fb34d (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
# shellcheck disable=SC2034,SC2148,SC2154,SC2164

# Maintainer: Alessandro Cerruti
# Contributor: Alessandro Cerruti

_pkgbase=i3bard
pkgname=i3bard-git
pkgver=r54.a7109db
pkgrel=1
pkgdesc='async i3bar status_command generator that can synchronize multiple instances'
arch=('any')
url='https://gitlab.com/chrooti/i3bard'
license=('MIT')
depends=(python)
makedepends=(
	git
	python-build
	python-installer
	python-setuptools
	python-wheel
)
source=('i3bard::git+https://gitlab.com/chrooti/i3bard.git')
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgbase}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

package() {
	cd "${srcdir}/${_pkgbase}"

	python -m installer --destdir="$pkgdir" dist/*.whl

	find cmdlets \
		-type f \
		-name '*.py' \
		-exec install -D --mode=644 {} "${pkgdir}"/usr/lib/i3bard/{} \;

	install -D -m 644 i3bard.service "$pkgdir"/usr/lib/systemd/user/i3bard.service
	install -D -m 644 i3bard.socket "$pkgdir"/usr/lib/systemd/user/i3bard.socket
}