# Maintainer: Jonas Witschel # Contributor: Hexchain Tong pkgname=tpm2-tss-git pkgver=2.0.0.r152.311acb02 pkgrel=1 pkgdesc='Implementation of the 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' 'gnulib-git') 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}" sed --in-place 's|@CODE_COVERAGE_RULES@|include $(top_srcdir)/aminclude_static.am|' Makefile.am ./bootstrap --include=/usr/share/gnulib-git/m4 } build() { cd "${pkgname%-git}" ./configure --prefix=/usr --with-udevrulesprefix=60- make } check() { cd "${pkgname%-git}" ./configure --prefix=/usr --with-udevrulesprefix=60- --enable-unit --enable-integration make check } package() { cd "${pkgname%-git}" make DESTDIR="$pkgdir" install install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" echo 'u tss - "tpm2-tss udev rules"' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" }