summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 10ff1d5c4f9c9c09bacf9ae5ac2cfa33685cab7c (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
# Maintainer: DanielNak <daniel@tee.cat>
# Python package author: Matt Gorko <https://github.com/MattGorko>

_branch=master
_author=MattGorko
_pkgname=U2F-Emulated
pkgname=u2f-emulated
pkgver=1.0
pkgrel=1
pkgdesc="Software that emulates U2F through a virtual USB device."
arch=('any')
url="https://github.com/$_author/$pkgname"
license=('GPL2')
# depends=('')
makedepends=('clang')
checkdepends=('criterion')
provides=("$pkgname")
conflicts=("$pkgname")
source=(
	"https://github.com/$_author/$pkgname/archive/refs/heads/master.zip"
	"$pkgname.service"
)
sha256sums=(
	'7eb4057524c1fb02d7883d189732428fe16fa36ac8ef1582304ad6d021698745'
	'8f03a228dc9c86d977714f2e8975a0c920e6faf3521912eb0cae789c77870786'
)
install=$pkgname.install

build() {
	cd "$srcdir/$_pkgname-$_branch"
	sed -i "s#keys#/usr/share/$pkgname/keys#g" setup.sh
	make
}

check() {
	cd "$srcdir/$_pkgname-$_branch"
	make check
}

package(){
	cd "$srcdir"
	install -Dm644 $pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
	cd "$_pkgname-$_branch"
	install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
	install -Dm755 setup.sh "$pkgdir/usr/bin/$pkgname-setup"
	install -Dm644 README* "$pkgdir/usr/share/$pkgname/README"
}