# Contributor: Erik Larsson # Contributor: Alexander Sack # Maintainer: Alexander Sack pkgname=tpm2-tss pkgver=2.3.1 pkgrel=1 pkgdesc="TPM 2.0 TSS" url="https://github.com/tpm2-software/tpm2-tss/" arch="all !s390x" # Failing test license="BSD-2-Clause" makedepends="automake autoconf openssl-dev doxygen perl linux-headers cmocka-dev" subpackages=" $pkgname-doc $pkgname-mu $pkgname-sys $pkgname-esys $pkgname-tcti-device $pkgname-tcti-mssim $pkgname-rc $pkgname-tctildr $pkgname-static $pkgname-dev " source="https://github.com/tpm2-software/tpm2-tss/releases/download/$pkgver/tpm2-tss-$pkgver.tar.gz tctildr-disable-optimization.patch " build() { # Disable inlining so tctildr unit tests will work # gcc inlines strlen which the cmocka tests tries to wrap ./configure CFLAGS="-fno-inline" \ --prefix=/usr \ --without-udevrulesdir \ --with-tctidefaultmodule="libtss2-tcti-device.so" \ --with-tctidefaultconfig=/dev/tpmrm0 \ --with-crypto=ossl \ --enable-unit make } check() { make check } package() { make DESTDIR="$pkgdir" install } mu() { pkgdesc="TPM 2.0 Marshaling libraries" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-mu.so.* "$subpkgdir/usr/lib" } sys() { pkgdesc="TPM 2.0 System API libraries" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-sys.so.* "$subpkgdir/usr/lib" } esys() { pkgdesc="TPM 2.0 Enhanced System API libraries" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-esys.so.* "$subpkgdir/usr/lib" } device() { pkgdesc="TPM 2.0 Device TCTI" provides="libtss2-tcti" provider_priority="100" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-tcti-device.so* "$subpkgdir/usr/lib" } mssim() { pkgdesc="TPM 2.0 Simulator TCTI" provides="libtss2-tcti" provider_priority="10" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-tcti-mssim.so* "$subpkgdir/usr/lib" } rc() { pkgdesc="TPM 2.0 RC libraries" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-rc.so* "$subpkgdir/usr/lib" } tctildr() { pkgdesc="TPM 2.0 TCTI loader libraries" mkdir -p "$subpkgdir/usr/lib" mv "$pkgdir"/usr/lib/libtss2-tctildr.so* "$subpkgdir/usr/lib" } sha512sums="f218da271b53745df9aae32b45326bb2cec46da77b8360238eeaec39679a92a9f6a92d3ce86cb5f22a075c280b2317e6ab0b3ea6674390ffc4bd548b161bd553 tpm2-tss-2.3.1.tar.gz 0b9fc3e0310d093d35b03b7f4aee6137577521bd346177870b576f696fa9674fde598d85267af7ebf8d92ebf4b8f37321fcce277b038a0b099bd82c91944ca5e tctildr-disable-optimization.patch"