moonlock/pkg/PKGBUILD
nevaforget a05c2030e8 Clean dist/ before wheel build to prevent stale artifacts
Version bumps leave old wheels in dist/, causing the glob to
expand to multiple files and python-installer to fail.
2026-03-26 15:49:37 +01:00

55 lines
1.2 KiB
Bash

# ABOUTME: PKGBUILD for Moonlock — secure Wayland lockscreen.
# ABOUTME: Builds from git source with automatic version detection.
# Maintainer: Dominik Kressler
pkgname=moonlock-git
pkgver=0.1.1.r0.g22f725e
pkgrel=1
pkgdesc="A secure Wayland lockscreen with GTK4, PAM and fingerprint support"
arch=('any')
url="https://gitea.moonarch.de/nevaforget/moonlock"
license=('MIT')
depends=(
'python'
'python-gobject'
'gtk4'
'gtk4-layer-shell'
'pam'
)
makedepends=(
'git'
'python-build'
'python-installer'
'python-hatchling'
)
optdepends=(
'fprintd: fingerprint authentication support'
)
provides=('moonlock')
conflicts=('moonlock')
source=("git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/moonlock"
git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}
build() {
cd "$srcdir/moonlock"
rm -rf dist/
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/moonlock"
python -m installer --destdir="$pkgdir" dist/*.whl
# PAM configuration
install -Dm644 config/moonlock-pam "$pkgdir/etc/pam.d/moonlock"
# Example config
install -Dm644 config/moonlock.toml.example "$pkgdir/etc/moonlock/moonlock.toml.example"
}