diff options
author | David Xu | 2023-08-01 03:13:25 +0800 |
---|---|---|
committer | David Xu | 2023-08-01 03:14:30 +0800 |
commit | de20a351c7b3f41b9b1f7b34b7c92129fecab4c9 (patch) | |
tree | 8727621b96eada50ddcd1b71464268aee194db8f | |
download | aur-de20a351c7b3f41b9b1f7b34b7c92129fecab4c9.tar.gz |
libfprint-git-fpcmoh: initial commit
This is a patched libfprint-git that have a proprietary FPC
match-on-host driver for device 10a5:9800 linked against it.
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 54 |
2 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8ee0443f96aa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = libfprint-fpcmoh-git + pkgdesc = libfprint with proprietary FPC match on host device 10a5:9800 driver + pkgver = 1.94.5.r47.g903ee43 + pkgrel = 1 + url = https://fprint.freedesktop.org/ + arch = x86_64 + groups = fprint + license = LGPL + makedepends = git + makedepends = meson + makedepends = gtk-doc + makedepends = gobject-introspection + makedepends = systemd + depends = libgusb + depends = pixman + depends = nss + depends = systemd-libs + provides = libfprint=1.94.5.r47.g903ee43 + provides = libfprint-2.so + provides = libfpcbep.so + conflicts = libfprint + source = git+https://gitlab.freedesktop.org/libfprint/libfprint.git + source = fpcbep.zip::https://download.lenovo.com/pccbbs/mobiles/r1slm01w.zip + source = https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/396.patch + sha256sums = SKIP + sha256sums = c7290f2a70d48f7bdd09bee985534d3511ec00d091887b07f81cf1e08f74c145 + sha256sums = SKIP + +pkgname = libfprint-fpcmoh-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aef7da221990 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +pkgname=libfprint-fpcmoh-git +_pkgname=libfprint +pkgrel=1 +pkgver=1.94.5.r47.g903ee43 +pkgdesc="libfprint with proprietary FPC match on host device 10a5:9800 driver" +url="https://fprint.freedesktop.org/" +arch=(x86_64) +license=(LGPL) +depends=(libgusb pixman nss systemd-libs) +makedepends=(git meson gtk-doc gobject-introspection systemd) +provides=("libfprint=$pkgver" libfprint-2.so libfpcbep.so) +conflicts=(libfprint) +groups=(fprint) +source=( + "git+https://gitlab.freedesktop.org/libfprint/libfprint.git" + "fpcbep.zip::https://download.lenovo.com/pccbbs/mobiles/r1slm01w.zip" + "https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/396.patch") +sha256sums=( + 'SKIP' + 'c7290f2a70d48f7bdd09bee985534d3511ec00d091887b07f81cf1e08f74c145' + 'SKIP') + +pkgver() { + cd $_pkgname + git describe --tags | sed 's/^V_\|^v//;s/_/./g;s/-/.r/;s/-/./' +} + +prepare() { + libfpcbep_path=$(find . -name 'libfpcbep.so') + cp -f $libfpcbep_path $_pkgname + cd $_pkgname + git apply $srcdir/396.patch + # patch meson.build + # use '+' as sed delimiter + sed -ibak "s+find_library[(]'fpcbep', required: true[)]+find_library('fpcbep', required: true, dirs: \'$(pwd)\')+g" ./meson.build +} + +# We do not perform any checks here as the python scripts can be buggy + +build() { + arch-meson $_pkgname build + meson compile -C build +} + + +package() { + DESTDIR="$pkgdir" meson install -C build + install -D $srcdir/$_pkgname/libfpcbep.so $pkgdir/usr/lib/libfpcbep.so + install -Dm644 $srcdir/FPC_driver_linux_libfprint/install_libfprint/lib/udev/rules.d/60-libfprint-2-device-fpc.rules \ + $pkgdir/usr/lib/udev/rules.d/60-libfprint-2-device-fpc.rules + cd $pkgdir/usr/lib + libfpcbep_needed=$(ldd libfprint-2.so | grep libfpcbep | sed 's/[(].*[)]//g') + patchelf --replace-needed $libfpcbep_needed libfpcbep.so libfprint-2.so +} |