summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelfRef2024-04-20 06:31:27 +0200
committerSelfRef2024-04-20 06:31:27 +0200
commit0d03fb5444647ae248bb39c0be8afb790633d105 (patch)
tree2eb58afa1b0ff75380546dbb45c091180570e516
parent051a574e23b3cfaf45cea936bea359ed6f47df3a (diff)
downloadaur-0d03fb5444647ae248bb39c0be8afb790633d105.tar.gz
Rewrite PKGBUILD
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD88
-rw-r--r--howdy.install9
4 files changed, 61 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6d308d81e009..5120ea9e954a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,33 +1,30 @@
pkgbase = howdy-git
- pkgdesc = Windows Hello for Linux
- pkgver = 2.6.1.r77.g96767fe
+ pkgdesc = Windows Hello style facial authentication for Linux
+ pkgver = r562.344eb34
pkgrel = 1
url = https://github.com/boltgolt/howdy
+ install = howdy.install
arch = x86_64
license = MIT
+ makedepends = git
+ makedepends = meson
+ makedepends = ninja
makedepends = cmake
- makedepends = pkgfile
- depends = opencv
- depends = hdf5
- depends = pam-python
+ depends = libinih
+ depends = libevdev
depends = python
- depends = python-pillow
depends = python-dlib
- depends = python-face_recognition
- depends = python-face_recognition_models
- depends = python-click
- depends = python-numpy
depends = python-opencv
provides = howdy
conflicts = howdy
- backup = usr/lib/security/howdy/config.ini
- source = git+https://github.com/boltgolt/howdy.git
+ backup = etc/howdy/config.ini
+ source = howdy::git+https://github.com/boltgolt/howdy.git
source = https://github.com/davisking/dlib-models/raw/master/dlib_face_recognition_resnet_model_v1.dat.bz2
source = https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2
source = https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2
- sha256sums = SKIP
- sha256sums = abb1f61041e434465855ce81c2bd546e830d28bcbed8d27ffbe5bb408b11553a
- sha256sums = db9e9e40f092c118d5eb3e643935b216838170793559515541c56a2b50d9fc84
- sha256sums = 6e787bbebf5c9efdb793f6cd1f023230c4413306605f24f299f12869f95aa472
+ md5sums = SKIP
+ md5sums = 1b31cc4419cc8f1018117249b64bd683
+ md5sums = 5edccec8ac713d743be4865ff6ead7f7
+ md5sums = ef591cf713630226b35b11d0e1733118
pkgname = howdy-git
diff --git a/.gitignore b/.gitignore
index 4989050fb8b7..b5ae54f56a67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,3 @@
-pkg
-src
-*.tar.gz
-*.zip
-*.tar.xz
-*.patch
+*/
*.dat.bz2
-*.tar.zst
-howdy
+*.pkg.tar.zst \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 4029aed7c32a..a8034cf20636 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,67 +1,51 @@
-# Maintainer: Caleb Fontenot <foley2431@gmail.com>
+# Maintainer: SelfRef <arch@selfref.dev>
pkgname=howdy-git
-pkgver=2.6.1.r77.g96767fe
+pkgver=r562.344eb34
pkgrel=1
-pkgdesc="Windows Hello for Linux"
+pkgdesc="Windows Hello style facial authentication for Linux"
arch=('x86_64')
url="https://github.com/boltgolt/howdy"
license=('MIT')
-depends=(
- 'opencv'
- 'hdf5'
- 'pam-python'
- 'python'
- 'python-pillow'
- 'python-dlib'
- 'python-face_recognition'
- 'python-face_recognition_models'
- 'python-click'
- 'python-numpy'
- 'python-opencv'
-)
-makedepends=(
- 'cmake'
- 'pkgfile'
-)
-conflicts=(
- 'howdy'
-)
-provides=(
- 'howdy'
-)
-backup=('usr/lib/security/howdy/config.ini')
+makedepends=('git' 'meson' 'ninja' 'cmake')
+depends=('libinih' 'libevdev' 'python' 'python-dlib' 'python-opencv')
+provides=('howdy')
+conflicts=('howdy')
+backup=('etc/howdy/config.ini')
+install=howdy.install
source=(
- "git+https://github.com/boltgolt/howdy.git"
+ "howdy::git+https://github.com/boltgolt/howdy.git"
"https://github.com/davisking/dlib-models/raw/master/dlib_face_recognition_resnet_model_v1.dat.bz2"
"https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2"
"https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2"
)
-sha256sums=('SKIP'
- 'abb1f61041e434465855ce81c2bd546e830d28bcbed8d27ffbe5bb408b11553a'
- 'db9e9e40f092c118d5eb3e643935b216838170793559515541c56a2b50d9fc84'
- '6e787bbebf5c9efdb793f6cd1f023230c4413306605f24f299f12869f95aa472')
+md5sums=(
+ 'SKIP'
+ '1b31cc4419cc8f1018117249b64bd683'
+ '5edccec8ac713d743be4865ff6ead7f7'
+ 'ef591cf713630226b35b11d0e1733118'
+)
+
pkgver() {
- cd "$srcdir/howdy"
- git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ cd ${pkgname%-git}
+ ( set -o pipefail
+ git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+ )
}
-
-package() {
- # Installing the proper license files and the rest of howdy
- cd "howdy"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/howdy/LICENSE"
- mkdir -p "${pkgdir}/usr/lib/security/howdy"
- cp -rv howdy/src/* "${pkgdir}/usr/lib/security/howdy"
- mkdir -p ${pkgdir}/usr/lib/howdy-gtk
- cp -rv howdy-gtk/src/* ${pkgdir}/usr/lib/howdy-gtk
- cp "${srcdir}/dlib_face_recognition_resnet_model_v1.dat" "${pkgdir}/usr/lib/security/howdy/dlib-data/"
- cp "${srcdir}/mmod_human_face_detector.dat" "${pkgdir}/usr/lib/security/howdy/dlib-data/"
- cp "${srcdir}/shape_predictor_5_face_landmarks.dat" "${pkgdir}/usr/lib/security/howdy/dlib-data/"
- chmod 600 -R "${pkgdir}/usr/lib/security/howdy"
- mkdir -p "${pkgdir}/usr/bin"
- ln -s /lib/security/howdy/cli.py "${pkgdir}/usr/bin/howdy"
- chmod +x "${pkgdir}/usr/lib/security/howdy/cli.py"
- mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
- cp -v howdy/src/autocomplete/howdy "${pkgdir}/usr/share/bash-completion/completions/howdy"
+
+build() {
+ cd "$srcdir"
+ arch-meson "${pkgname%-git}" build
+ meson compile -C build
}
+package() {
+ cd "$srcdir"
+ meson install -C build --destdir "$pkgdir"
+ install -Dm644 "${pkgname%-git}/howdy/src/config.ini" "$pkgdir/etc/howdy/config.ini"
+ install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
+
+ cd "$srcdir"
+ install -Dm644 *.dat "$pkgdir/usr/share/dlib-data"
+} \ No newline at end of file
diff --git a/howdy.install b/howdy.install
new file mode 100644
index 000000000000..602996357906
--- /dev/null
+++ b/howdy.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo '[SETUP] 1. Remember to set a correct video device using `sudo howdy config`'
+ echo '[SETUP] 2. Test settings with `sudo howdy test`'
+ echo '[SETUP] 3. Add face model with `sudo howdy add`'
+ echo '[SETUP] 4. Add PAM policy `auth sufficient pam_howdy.so` to e.g. top of `/etc/pam.d/system-local-login`'
+ echo '[INFO] List of available video devices can be obtained with `v4l2-ctl --list-devices` from `v4l-utils` package'
+ echo '[INFO] More informations at the wiki: https://github.com/boltgolt/howdy/wiki/Cameras-that-have-been-verified-to-work-with-Howdy'
+ echo '[INFO] Arch Wiki page: https://wiki.archlinux.org/title/Howdy'
+} \ No newline at end of file