# Contributor: Erik Larsson # Contributor: Alexander Sack # Maintainer: Alexander Sack pkgname=tpm2-tss pkgver=2.3.3 pkgrel=0 pkgdesc="TPM 2.0 TSS" url="https://github.com/tpm2-software/tpm2-tss/" arch="all" license="BSD-2-Clause" makedepends="automake autoconf libtool openssl-dev doxygen perl linux-headers cmocka-dev autoconf-archive" subpackages=" $pkgname-doc $pkgname-mu $pkgname-sys $pkgname-esys $pkgname-tcti-device $pkgname-tcti-mssim $pkgname-rc $pkgname-tctildr $pkgname-static $pkgname-dev " source="$pkgname-$pkgver.tar.gz::https://github.com/tpm2-software/tpm2-tss/archive/$pkgver.tar.gz" prepare() { default_prepare ./bootstrap } build() { ./configure \ --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="77fc384fb899d3c5646bde4cdcb59060c31ebeacd466e0e89901105fd0e873fb296d1d48e2f2dd214a25c1e204287738c747a8888ce0f11f759138c86e8dcda7 tpm2-tss-2.3.3.tar.gz"