blob: 7e7f3e2875026fd9070b5315a6fc4a4234037a2e (
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: Jonas Witschel <diabonas at gmx dot de>
# Contributor: Hexchain Tong <i at hexchain dot org>
pkgname=tpm2-tss-git
pkgver=2.0.0.r268.79d31052
pkgrel=1
pkgdesc='Implementation of the TCG Trusted Platform Module 2.0 Software Stack (TSS2)'
arch=('x86_64')
url='https://github.com/tpm2-software/tpm2-tss'
license=('BSD')
depends=('openssl')
makedepends=('git' 'autoconf-archive' 'doxygen')
checkdepends=('cmocka' # for unit test suite
'ibm-sw-tpm2' 'iproute2' 'procps-ng' 'uthash') # for integration test suite
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha512sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
printf '%s' "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
prepare() {
cd "${pkgname%-git}"
# Temporary fix for a regression in Linux kernel 5.0, see
# https://github.com/tpm2-software/tpm2-tools/issues/1356#issuecomment-471641297
sed --in-place 's/ | O_NONBLOCK//' src/tss2-tcti/tcti-device.c
./bootstrap
}
build() {
cd "${pkgname%-git}"
(( CHECKFUNC )) && _opts=('--enable-unit' '--enable-integration')
./configure --prefix=/usr --with-udevrulesprefix=60- "${_opts[@]}"
make
}
check() {
cd "${pkgname%-git}"
make check
}
package() {
cd "${pkgname%-git}"
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
echo 'u tss - "tss user for tpm2"' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}
|