summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a8034cf20636927f9e7f76601a4f4690b900c1bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: SelfRef <arch@selfref.dev>

pkgname=howdy-git
pkgver=r562.344eb34
pkgrel=1
pkgdesc="Windows Hello style facial authentication for Linux"
arch=('x86_64')
url="https://github.com/boltgolt/howdy"
license=('MIT')
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=(
	"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"
)
md5sums=(
	'SKIP'
	'1b31cc4419cc8f1018117249b64bd683'
	'5edccec8ac713d743be4865ff6ead7f7'
	'ef591cf713630226b35b11d0e1733118'
)

pkgver() {
	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)"
	)
}

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"
}