blob: b07aedf73f4e99bc299f8d989601feb7daab3cb3 (
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Maintainer: Jonas Malaco <jonas@protocubo.io>
# Contributor: Adam Rutkowski
# Contributor: Fabio Loli
# Contributor: Sergey Kasmy
pkgname=liquidctl-git
pkgver=1.13.0.r92.702bf32
pkgrel=1
pkgdesc='Cross-platform tool and drivers for liquid coolers and other devices'
arch=('any')
url='https://github.com/liquidctl/liquidctl'
license=('GPL3')
depends=(
i2c-tools
python
python-colorlog
python-crcmod
python-docopt
python-hidapi
python-pillow
python-pyusb
python-setuptools
)
makedepends=(
git
python-build
python-installer
python-setuptools-scm
python-wheel
)
checkdepends=(
python-pytest
)
optdepends=(
'python-psutil: use system/hwmon sensors in yoda'
'python-prometheus_client: export data to Prometheus'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(
"$pkgname::git+https://github.com/liquidctl/liquidctl.git#branch=main"
)
sha256sums=(
SKIP
)
pkgver() {
cd $pkgname
printf "%s" "$(git describe --long --abbrev=7 | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^v//')"
}
build() {
cd $pkgname
python -m build --wheel --no-isolation
}
check() {
cd $pkgname
mkdir -p runtime
XDG_RUNTIME_DIR=runtime python -m pytest
python -m liquidctl list --verbose
}
package() {
cd $pkgname
python -m installer --destdir="$pkgdir" dist/liquidctl-"$(python -m setuptools_scm)"-*.whl
# documentation
install -Dm644 -t "$pkgdir"/usr/share/man/man8 liquidctl.8
install -dm755 "$pkgdir"/usr/share/doc/$pkgname
cp -r -a --no-preserve=ownership docs/* "$pkgdir"/usr/share/doc/$pkgname
# device access
install -Dm644 -t "$pkgdir"/usr/lib/udev/rules.d/ extra/linux/71-liquidctl.rules
# completions
install -Dm644 extra/completions/liquidctl.bash "$pkgdir"/usr/share/bash-completion/completions/liquidctl
# extra scripts
install -Dm755 extra/yoda.py "$pkgdir"/usr/bin/yoda
install -Dm755 extra/liquiddump.py "$pkgdir"/usr/bin/liquiddump
install -Dm755 extra/prometheus-liquidctl-exporter.py "$pkgdir"/usr/bin/prometheus-liquidctl-exporter
}
|