Files
omarchy-pkgs/pkgbuilds/libfprint-git/PKGBUILD
T
David Heinemeier HanssonandClaude Fable 5 7fb4dd4746 Pin libfprint-git to last known good commit
libfprint 1.94.100 ships the focaltech_moc driver and the FocalTech
FT9349 (2808:a97a) ID, so Omarchy is back on stock libfprint. Keep
this package as an escape hatch, pinned to the commit behind the
currently published build so it can't drift onto untested master.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V6ADCjSXt3kd9XGCAJKJkT
2026-07-26 12:30:04 -07:00

92 lines
2.1 KiB
Bash

# Maintainer: Mikko Nyman <mikko@nyman.xyz>
# Based on the Arch libfprint package by Jan Alexander Steffens (heftig).
#
# Carried the focaltech_moc driver and the FocalTech FT9349 device ID
# (USB 2808:a97a, ASUS ExpertBook Ultra B9406CAA) while mainline libfprint
# releases (1.94.x) lacked them. libfprint 1.94.100 ships both, so Omarchy
# has moved back to stock libfprint and no longer installs this package.
#
# Kept around pinned to the last known good commit as an escape hatch;
# the fallback patch stays for the conditional in prepare().
pkgname=libfprint-git
pkgver=1.94.10.r12.gd79f157
pkgrel=1.1
pkgdesc="Library for fingerprint readers (libfprint master with FocalTech MOC updates)"
url="https://fprint.freedesktop.org/"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
gcc-libs
glib2
glibc
libgudev
libgusb
openssl
pixman
)
makedepends=(
git
glib2-devel
gobject-introspection
gtk-doc
meson
python-cairo
python-gobject
systemd
)
checkdepends=(
cairo
umockdev
)
provides=(libfprint libfprint-2.so)
conflicts=(libfprint)
groups=(fprint)
source=(
"git+https://gitlab.freedesktop.org/libfprint/libfprint.git#commit=d79f157282085738ea8ffbe8c2ae96fb8b3ad831"
"focaltech_moc-add-pid-0xA97A.patch"
)
b2sums=(
'SKIP'
'SKIP'
)
pkgver() {
cd libfprint
( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null \
| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \
|| printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}
prepare() {
cd libfprint
if ! grep -qi 'pid = 0xa97a' libfprint/drivers/focaltech_moc/focaltech_moc.c; then
patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch"
fi
}
build() {
local meson_options=(
-D drivers=all
-D installed-tests=false
)
arch-meson libfprint build "${meson_options[@]}"
meson compile -C build
# Regenerate autosuspend.hwdb from the patched id_table[] so the
# udev-hwdb test in check() doesn't fail on the new PID 0xA97A.
ninja -C build sync-udev-hwdb
}
check() {
meson test -C build --print-errorlogs
}
package() {
meson install -C build --destdir "$pkgdir"
}
# vim:set sw=2 sts=-1 et: