aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Larsson <who+github@cnackers.org>2019-10-04 21:00:22 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-11-09 00:49:10 -0300
commitac32f705e282492b75f3121e840a3eaf48bdf79f (patch)
treef36290a0088041bed09c5250e5b5cb94776041a9
parentc0ff90c001abb247d73e23f9589dd1f108ba7fc8 (diff)
downloadaports-ac32f705e282492b75f3121e840a3eaf48bdf79f.tar.bz2
aports-ac32f705e282492b75f3121e840a3eaf48bdf79f.tar.xz
community/tpm2-tss: new aport
-rw-r--r--community/tpm2-tss/APKBUILD88
1 files changed, 77 insertions, 11 deletions
diff --git a/community/tpm2-tss/APKBUILD b/community/tpm2-tss/APKBUILD
index 8e005a3aa9..e2714e73d3 100644
--- a/community/tpm2-tss/APKBUILD
+++ b/community/tpm2-tss/APKBUILD
@@ -1,27 +1,93 @@
+# Contributor: Erik Larsson <who+alpine@cnackers.org>
# Contributor: Alexander Sack <asac@pantacor.com>
# Maintainer: Alexander Sack <asac@pantacor.com>
-pkgname="tpm2-tss"
-pkgver="2.3.1"
-pkgrel=0
-pkgdesc="TPM2 tss library"
+pkgname=tpm2-tss
+pkgver=2.3.1
+pkgrel=1
+pkgdesc="TPM 2.0 TSS"
url="https://github.com/tpm2-software/tpm2-tss/"
arch="all"
license="BSD-2-Clause"
-makedepends="openssl-dev doxygen linux-headers cmocka-dev"
-subpackages="$pkgname-dev $pkgname-doc"
+makedepends="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"
-options="!check"
build() {
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr
+ # 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"