Username: Password: Remember me
# Maintainer: Bruno Pagani <archange@archlinux.org>
 
pkgname=tpm2-tss
pkgver=2.3.1
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=(doxygen)
source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc})
sha256sums=('7096576c1946b85ec9c92b39e0ed3409ec01bdb97d7863ead033243d5433dee7' 'SKIP')
validpgpkeys=(D760B790CCF0A41CBE7B047C316CC1FB24ABDC72  # Tadeusz Struk <tadeusz.struk@intel.com>
              D6B4D8BAC7E0CC97DCD4AC7272E88B53F7A95D84) # Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
 
build() {
    cd ${pkgname}-${pkgver}
    ./configure --prefix=/usr --with-udevrulesprefix=60- $( ((CHECKFUNC)) && echo --enable-unit --enable-integration)
    make
}
 
package() {
    cd ${pkgname}-${pkgver}
    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
    rm "${pkgdir}"/usr/lib/libtss2-tcti-default.so # https://github.com/tpm2-software/tpm2-tss/issues/1482#issuecomment-516363966
}