nevaforget 5fc1781262
Some checks failed
Build and publish packages / build-and-publish (push) Failing after 14m14s
fix(pkgbuild): honour CARGO_TARGET_DIR in install path
The act_runner exports CARGO_TARGET_DIR=/cache/target for cache
persistence, but the three Rust-app PKGBUILDs hardcoded
target/release/<bin>. Run 87 compiled 8 min then failed at
install stage. Use ${CARGO_TARGET_DIR:-target} so both CI and
local makepkg work.
2026-04-23 13:04:31 +02:00

57 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.6.9.r1.g3f4448c
pkgrel=5
pkgdesc="A secure Wayland lockscreen with GTK4, PAM and fingerprint support"
arch=('x86_64')
url="https://gitea.moonarch.de/nevaforget/moonlock"
license=('MIT')
depends=(
'gtk4'
'gtk4-layer-shell'
'gtk-session-lock'
'pam'
'systemd-libs'
)
makedepends=(
'git'
'cargo'
'gtk4'
'gtk4-layer-shell'
'gtk-session-lock'
'pam'
'pkgconf'
)
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"
cargo build --release
}
package() {
cd "$srcdir/moonlock"
install -Dm755 "${CARGO_TARGET_DIR:-target}/release/moonlock" "$pkgdir/usr/bin/moonlock"
# 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"
}