diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-03-11 16:50:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-08 18:14:18 -0700 |
commit | 1dba349a7b272071d613869adaaef7bd576ae0c2 (patch) | |
tree | df71531ad06215586f3a6fd53eced7eb2aa6d54b | |
parent | ea24233c2bb4f7e4a31aec478d45122fda79739d (diff) | |
download | tpm2-1dba349a7b272071d613869adaaef7bd576ae0c2.tar.gz |
pkg-config: Script to produce libtpm2.pc
Required in order for crosvm to find and use the correct libtpm2.a.
Based on a similar script in src/platform2/libtpmcrypto and Kokoro's
libtpm2.pc in src/platform/crosvm/kokoro/pkgconfig/libtpm2.pc.
BUG=chromium:911799
TEST=./thirdparty_preinstall.sh 9999 /tmp/pkgconfig; cat /tmp/pkgconfig/libtpm2.pc
TEST=(with CL:1515975) emerge-nami tpm2
TEST=(with CL:1515975) USE=crosvm-tpm emerge-nami crosvm
Change-Id: I574799c94ae488bbc54548a0abdd3ec23204fdac
Reviewed-on: https://chromium-review.googlesource.com/1516261
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
-rw-r--r-- | libtpm2.pc.in | 7 | ||||
-rwxr-xr-x | thirdparty_preinstall.sh | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/libtpm2.pc.in b/libtpm2.pc.in new file mode 100644 index 0000000..03671dc --- /dev/null +++ b/libtpm2.pc.in @@ -0,0 +1,7 @@ +bslot=@BSLOT@ + +Name: tpm2 +Description: TPM simulator extracted from the TCG TPM 2.0 library specification +Version: ${bslot} +Requires.private: libcrypto +Libs: -ltpm2 diff --git a/thirdparty_preinstall.sh b/thirdparty_preinstall.sh new file mode 100755 index 0000000..2dee1ff --- /dev/null +++ b/thirdparty_preinstall.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Copyright 2019 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -ex + +v=$1 +out=$2 + +mkdir -p "${out}" +sed -e "s/@BSLOT@/${v}/g" libtpm2.pc.in > "${out}/libtpm2.pc" |