blob: fab923ea93cd31ae1565d6eedb31328b28f99042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Jonas Witschel <diabonas@archlinux.org>
_android_arch=riscv64
pkgname=android-${_android_arch}-libtpms
pkgver=0.10.0
pkgrel=1
arch=('any')
pkgdesc="Library providing a software emulation of a Trusted Platform Module (TPM 1.2 and TPM 2.0) (Android ${_android_arch})"
url='https://github.com/stefanberger/libtpms'
license=('BSD')
groups=('android-libtpms')
depends=("android-${_android_arch}-openssl")
makedepends=('android-configure')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/stefanberger/libtpms/archive/refs/tags/v${pkgver}.tar.gz")
md5sums=('f00d71ff14c96cea0824d07c649c7a31')
prepare() {
cd "${srcdir}/libtpms-${pkgver}"
source android-env ${_android_arch}
autoreconf --install --force
sed -i 's/ = index(/ = strchr(/g' src/tpm2/RuntimeProfile.c
}
build() {
cd "${srcdir}/libtpms-${pkgver}"
source android-env ${_android_arch}
android-${_android_arch}-configure \
--with-openssl \
--with-tpm2
make $MAKEFLAGS
}
package() {
cd "${srcdir}/libtpms-${pkgver}"
source android-env ${_android_arch}
make DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}
|