summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMark Blakeney2023-09-09 10:19:01 +1000
committerMark Blakeney2023-09-09 10:19:01 +1000
commit018aff759b5f66b1c8c894464b27dff589909b22 (patch)
treee409f1507b04f6f6222a53e2769a1dbb8a4717a4 /PKGBUILD
parent975ab7decccbc2e13cd472677884b4a4177962fb (diff)
downloadaur-018aff759b5f66b1c8c894464b27dff589909b22.tar.gz
Update to 1.21
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 11 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2186c9a11138..2f25776f100b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
# Maintainer: mark.blakeney at bullet-systems dot net
pkgname=sleep-inhibitor
-pkgver=1.20
+_pkgname="${pkgname/-/_}"
+pkgver=1.21
pkgrel=1
pkgdesc="Program to run plugins to inhibit system sleep/suspend"
url="https://github.com/bulletmark/$pkgname"
@@ -8,18 +9,24 @@ license=(GPL3)
arch=(any)
backup=("etc/$pkgname.conf")
depends=("python>=3.7" "python-ruamel-yaml")
-makedepends=(python-setuptools python-build python-installer python-wheel)
+makedepends=(python-setuptools python-build python-installer
+ python-wheel python-setuptools-scm)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
-sha1sums=('1705a486fe36a7206da87d2a1e24882595f71dab')
+sha1sums=('be386d4ae71ec5915d97129264e961d36fd513d9')
build() {
cd "$srcdir/$pkgname-$pkgver"
- python -m build --wheel --no-isolation
+ SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$pkgname-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # Require special handling for python data files on Arch
+ local pdir=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -m 644 -t "$pkgdir/$pdir/$_pkgname/" "$_pkgname/${pkgname}.conf"
+ install -m 644 -t "$pkgdir/$pdir/$_pkgname/" "$_pkgname/${pkgname}.service"
}
# vim:set ts=2 sw=2 et: