2023-06-15 16:26:11 +02:00
|
|
|
# Maintainer: Daniel Langbein < daniel [ at ] systemli [ dot ] org >
|
|
|
|
|
|
|
|
# This PKGBUILD is based on the instructions from the Arch Linux wiki:
|
|
|
|
# https://wiki.archlinux.org/title/Python_package_guidelines
|
|
|
|
|
|
|
|
_name=de-p1st-monitor
|
|
|
|
pkgname="python-$_name-git"
|
2023-06-21 19:44:10 +02:00
|
|
|
pkgver=r10.5ba9b3c
|
2023-06-15 16:26:11 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='periodically monitor and warn'
|
|
|
|
arch=(any)
|
2023-06-16 13:55:00 +02:00
|
|
|
url="https://codeberg.org/privacy1st/$_name"
|
2023-06-15 16:26:11 +02:00
|
|
|
license=('custom:BSD-3-Clause-Clear-License')
|
|
|
|
|
|
|
|
provides=(de-p1st-monitor)
|
|
|
|
depends=(python exec-notify)
|
|
|
|
makedepends=(git python-build python-installer python-wheel)
|
|
|
|
optdepends=('python-psutil: CPU, memory, network monitoring'
|
|
|
|
'digitemp: USB temperature sensor'
|
|
|
|
'smartmontools: disk temperature monitoring')
|
|
|
|
|
2023-06-16 13:55:00 +02:00
|
|
|
source=("git+https://codeberg.org/privacy1st/$_name.git")
|
2023-06-15 16:26:11 +02:00
|
|
|
b2sums=(SKIP)
|
|
|
|
|
|
|
|
# If there are no tags then use number of revisions since beginning of the history:
|
|
|
|
# https://wiki.archlinux.org/title/VCS_package_guidelines
|
|
|
|
pkgver() {
|
|
|
|
cd "$_name"
|
|
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
git -C "$srcdir/$_name" clean -dfx
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# cd "$_name-$pkgver"
|
|
|
|
cd "$_name"
|
|
|
|
python -m build --wheel --no-isolation
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
# cd "$_name-$pkgver"
|
|
|
|
cd "$_name"
|
|
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
}
|
|
|
|
|
|
|
|
check(){
|
|
|
|
cd "$srcdir/$_name"
|
|
|
|
|
|
|
|
# For nosetests
|
|
|
|
# nosetests
|
|
|
|
|
|
|
|
# For pytest
|
|
|
|
# pytest
|
|
|
|
}
|