OCaml 5.0.0 rebuild: Fix Pervasives deprecation
[arch-packages.git] / tpm2-tss / trunk / PKGBUILD
blob364a2a2b9baed7f2502f4de197d196b7c399a58c
1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 # Contributor: Bruno Pagani <archange@archlinux.org>
3 pkgname=tpm2-tss
4 pkgver=4.0.1
5 pkgrel=1
6 pkgdesc='Implementation of the TCG Trusted Platform Module 2.0 Software Stack (TSS2)'
7 arch=('x86_64')
8 url='https://github.com/tpm2-software/tpm2-tss'
9 license=('BSD')
10 depends=('curl' 'json-c' 'openssl' 'libjson-c.so')
11 makedepends=('cmocka' 'doxygen' 'libtpms')
12 checkdepends=('iproute2' 'swtpm' 'uthash')
13 provides=('libtss2-esys.so' 'libtss2-fapi.so' 'libtss2-mu.so' 'libtss2-rc.so' 'libtss2-sys.so' 'libtss2-tctildr.so')
14 backup=('etc/tpm2-tss/fapi-config.json'
15         'etc/tpm2-tss/fapi-profiles/P_ECCP256SHA256.json'
16         'etc/tpm2-tss/fapi-profiles/P_RSA2048SHA256.json')
17 options=('!emptydirs' '!lto')
18 source=("$url/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"{,.asc}
19         'https://raw.githubusercontent.com/tpm2-software/tpm2-tss/e237e4d33cbf280292a480edd8ad061dcd3a37a2/lib/tss2-tcti-libtpms.map'
20         'https://github.com/tpm2-software/tpm2-tss/commit/218c0da8.patch')
21 sha512sums=('ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d'
22             'SKIP'
23             '55be966eb320c96ca49b3aaa0635815076fe1a21149d1a0f95654778c8359bd16f18a10c0cabe955a366d4a14e2645a8150878b601085d987727de40831e50ab'
24             '5c6f57ddf43b0c767578ecbad1df960ef0d77417eb1db0c9c492636a4b07c0b5b29cc031d5352d83aec4a8e1d67276587db24e7e188dfeecff5d7ed7c55cc30c')
25 validpgpkeys=('D6B4D8BAC7E0CC97DCD4AC7272E88B53F7A95D84'  # Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
26               '5B482B8E3E19DA7C978E1D016DE2E9078E1F50C1') # William Roberts (Bill Roberts) <william.c.roberts@intel.com>
28 prepare() {
29         cd "$pkgname-$pkgver"
30         # Add file missing from release tarball (https://github.com/tpm2-software/tpm2-tss/issues/2313)
31         cp "$srcdir/tss2-tcti-libtpms.map" lib
32         patch -p1 -i ../218c0da8.patch # Fix tests
35 build() {
36         cd "$pkgname-$pkgver"
37         ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
38                     --with-runstatedir=/run --with-sysusersdir=/usr/lib/sysusers.d \
39                     --with-tmpfilesdir=/usr/lib/tmpfiles.d --with-udevrulesprefix=60- \
40                     --enable-unit $( ((CHECKFUNC)) && echo --enable-integration)
41         make
44 check() {
45         cd "$pkgname-$pkgver"
46         make check
49 package() {
50         cd "$pkgname-$pkgver"
51         make DESTDIR="$pkgdir" install
52         install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"