#!/usr/bin/bash # JOBoRun : Jwm OpenBox Obarun RUNit # Maintainer : Joe Bo Run # PkgSource : url="https://git.disroot.org/joborun-pkg/jobcore/src/branch/main/$pkgname" # Website : https://pozol.eu #-----------------------------------------| DESCRIPTION |--------------------------------------- pkgname=tpm2-tss pkgver=4.0.1 pkgrel=01 pkgdesc='Implementation of the TCG Trusted Platform Module 2.0 Software Stack (TSS2)' url='https://github.com/tpm2-software/tpm2-tss' depends=('curl' 'json-c' 'openssl' 'libjson-c.so') makedepends=('cmocka' 'doxygen' 'libtpms') checkdepends=('iproute2' 'swtpm' 'uthash') provides=('libtss2-esys.so' 'libtss2-fapi.so' 'libtss2-mu.so' 'libtss2-rc.so' 'libtss2-sys.so' 'libtss2-tctildr.so') backup=('etc/tpm2-tss/fapi-config.json' 'etc/tpm2-tss/fapi-profiles/P_ECCP256SHA256.json' 'etc/tpm2-tss/fapi-profiles/P_RSA2048SHA256.json') #options=('debug' '!emptydirs' '!lto') # uncomment this to produce debug package and comment the next line options=('!emptydirs' '!lto') source=("$url/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"{,.asc} 'https://raw.githubusercontent.com/tpm2-software/tpm2-tss/e237e4d33cbf280292a480edd8ad061dcd3a37a2/lib/tss2-tcti-libtpms.map' 'https://github.com/tpm2-software/tpm2-tss/commit/218c0da8.patch') prepare() { cd "$pkgname-$pkgver" # Add file missing from release tarball (https://github.com/tpm2-software/tpm2-tss/issues/2313) cp "$srcdir/tss2-tcti-libtpms.map" lib patch -p1 -i ../218c0da8.patch # Fix tests } build() { cd "$pkgname-$pkgver" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --with-runstatedir=/run --with-sysusersdir=/usr/lib/sysusers.d \ --with-tmpfilesdir=/usr/lib/tmpfiles.d --with-udevrulesprefix=60- \ --enable-unit $( ((CHECKFUNC)) && echo --enable-integration) make } # fails some tests and gets stuck in one for long #check() { # cd "$pkgname-$pkgver" # make check #} # 4.0.1 we have other things to do today than wait hours and hours for tests to finish package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" } #---- arch license gpg-key & sha256sums ---- arch=(x86_64) license=('BSD') validpgpkeys=('D6B4D8BAC7E0CC97DCD4AC7272E88B53F7A95D84' # Andreas Fuchs '5B482B8E3E19DA7C978E1D016DE2E9078E1F50C1') # William Roberts (Bill Roberts) sha256sums=(532a70133910b6bd842289915b3f9423c0205c0ea009d65294ca18a74087c950 # tpm2-tss-4.0.1.tar.gz d610c1a376196457d0edba0e34746abc705058b018311fa231581e3e5e45732a # tpm2-tss-4.0.1.tar.gz.asc 41c37dc4b10b1e86023619150e5047739aeee93fd8f77315157d3eeb5fe6a981 # tss2-tcti-libtpms.map 76797d64092709d9af8b1d93750bc5d1f1e861e5a9fa37c24e0f1473b874be80) # 218c0da8.patch ## 2bf4730a0d4a6ba8be6d2517172aa68776082ad15e887d4418bf68cd4ffd0983 tpm2-tss-4.0.1-01-x86_64.pkg.tar.lz