face-unlock: rename from plasma-face-unlock

This commit is contained in:
Felitendo committed 2026-09-26 21:04:03 +02:00
1 parent 6c81910967
commit f45082937d
4 files changed

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
pkgbase = plasma-face-unlock
pkgdesc = Face ID for KDE Plasma: the lock screen, sudo and admin prompts by face, with a photo check
pkgver = 1.0.1
pkgrel = 1
url = https://github.com/LoonixTools/plasma-face-unlock
install = plasma-face-unlock.install
arch = x86_64
arch = aarch64
license = GPL-3.0-or-later
license = MIT
license = Apache-2.0
makedepends = cmake
makedepends = scdoc
depends = bash
depends = coreutils
depends = gawk
depends = grep
depends = sed
depends = gettext
depends = systemd
depends = systemd-libs
depends = pam
depends = polkit
depends = opencv
depends = qt6-base
depends = qt6-declarative
depends = layer-shell-qt
depends = ki18n
depends = kscreenlocker
noextract = face_detection_yunet_2023mar.onnx
noextract = face_recognition_sface_2021dec.onnx
source = plasma-face-unlock-1.0.1.tar.gz::https://github.com/LoonixTools/plasma-face-unlock/archive/refs/tags/v1.0.1.tar.gz
source = face_detection_yunet_2023mar.onnx::https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
source = face_recognition_sface_2021dec.onnx::https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx
sha256sums = 30bd9e5d76f93f4e196e2eae76d1185370cb51fc9d9954355a42779cd8f60d15
sha256sums = 8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4
sha256sums = 0ba9fbfa01b5270c96627c4ef784da859931e02f04419c829e83484087c34e79
pkgname = plasma-face-unlock
+33
View File
@@ -0,0 +1,33 @@
# Maintainer: Felitendo
# This PKGBUILD is updated automatically:
# https://github.com/Felitendo/PKGBUILDS
pkgname=plasma-face-unlock
pkgver=1.0.1
pkgrel=1
pkgdesc="Face ID for KDE Plasma: the lock screen, sudo and admin prompts by face, with a photo check"
arch=('x86_64' 'aarch64')
url="https://github.com/LoonixTools/plasma-face-unlock"
license=('GPL-3.0-or-later' 'MIT' 'Apache-2.0')
depends=('bash' 'coreutils' 'gawk' 'grep' 'sed' 'gettext' 'systemd' 'systemd-libs' 'pam' 'polkit'
'opencv' 'qt6-base' 'qt6-declarative' 'layer-shell-qt' 'ki18n' 'kscreenlocker')
makedepends=('cmake' 'scdoc')
install="${pkgname}.install"
# The two face networks come from the OpenCV model zoo, pinned by checksum.
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
"face_detection_yunet_2023mar.onnx::https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx"
"face_recognition_sface_2021dec.onnx::https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx")
noextract=('face_detection_yunet_2023mar.onnx' 'face_recognition_sface_2021dec.onnx')
sha256sums=('30bd9e5d76f93f4e196e2eae76d1185370cb51fc9d9954355a42779cd8f60d15' '8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4' '0ba9fbfa01b5270c96627c4ef784da859931e02f04419c829e83484087c34e79')
build() {
make -C "${pkgname}-${pkgver}" VERSION="$pkgver"
}
check() {
make -C "${pkgname}-${pkgver}" VERSION="$pkgver" test
}
package() {
make -C "${pkgname}-${pkgver}" VERSION="$pkgver" MODELS_SRC="$srcdir" DESTDIR="$pkgdir" install
}
+29
View File
@@ -0,0 +1,29 @@
post_install() {
cat <<'MSG'
plasma-face-unlock is installed but not active yet.
plasma-face-unlock interactive menu
plasma-face-unlock enable set up your face and turn it on
Run it as your own user, not with sudo. It asks for your password when it
needs to, and sudo and admin prompts stay with the password until you switch
them on under Settings.
MSG
}
pre_remove() {
cat <<'MSG'
Before removing this package, run
plasma-face-unlock disable
as each user that turned it on. That takes face unlock back out of sudo and
polkit. (Removing it without that is safe too: the PAM line is written so
that a missing module is skipped, and sudo keeps asking for the password.)
MSG
systemctl disable --now plasma-face-unlockd.socket plasma-face-unlockd.service >/dev/null 2>&1 || true
}
+29
View File
@@ -0,0 +1,29 @@
# plasma-face-unlock - Face ID for KDE Plasma
# (https://github.com/LoonixTools/plasma-face-unlock).
#
# Built from the release tarball with the upstream Makefile (CMake for the
# daemon, the agent and the PAM module). The two face networks are sources of
# their own from the OpenCV model zoo with fixed checksums, so a release only
# changes the tarball's.
UPSTREAM_REPO="LoonixTools/plasma-face-unlock"
# Installed in CI (pacman) before the makepkg test build, which skips the
# dependency check. check() runs the upstream tests and needs nothing more.
BUILD_DEPS=(cmake scdoc gettext opencv qt6-base qt6-declarative layer-shell-qt ki18n pam systemd-libs)
latest_version() {
curl -sf "https://api.github.com/repos/$UPSTREAM_REPO/releases/latest" \
| jq -r '.tag_name' | sed 's/^v//'
}
# refresh_checksums <version> <pkgbuild-path>
refresh_checksums() {
local ver="$1" pkgbuild="$2"
local sha
sha="$(curl -sfL \
"https://github.com/$UPSTREAM_REPO/archive/refs/tags/v$ver.tar.gz" \
| sha256sum | cut -d' ' -f1)"
# Only the first sum is the tarball's; the models' stay.
sed -i -E "s|^sha256sums=\('[^']*'|sha256sums=('$sha'|" "$pkgbuild"
}