| # 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. |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="7e56fbcc6f3c9e9ba98bf43a52940100e5fbc918" |
| CROS_WORKON_TREE=("ef118ceb3e8ebcc8b8a4ae6577a71d7ad210a722" "2bd42cf4f2f41e68c177dfdba095d8d3412fd76c" "1e9ca239fab09ba22b58e4a22d63e2ede865b159" "1ef556d83a5e2ce0fa6eef66d8e8b2ced65cf09b" "d8da1275feb26afab354f35df7316b3840f8330b" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_SUBTREE="common-mk libhwsec libhwsec-foundation tpm_softclear_utils trunks .gn" |
| |
| PLATFORM_SUBDIR="tpm_softclear_utils" |
| |
| inherit cros-workon platform |
| |
| DESCRIPTION="Utilities for soft-clearing TPM. This package resides in test images only." |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/tpm_softclear_utils/" |
| |
| LICENSE="BSD-Google" |
| KEYWORDS="*" |
| IUSE="test tpm tpm_dynamic tpm2" |
| REQUIRED_USE=" |
| tpm_dynamic? ( tpm tpm2 ) |
| !tpm_dynamic? ( ?? ( tpm tpm2 ) ) |
| " |
| |
| RDEPEND=" |
| tpm2? ( |
| chromeos-base/trunks:= |
| ) |
| tpm? ( |
| app-crypt/trousers:= |
| ) |
| chromeos-base/libhwsec-foundation:= |
| " |
| |
| DEPEND="${RDEPEND} |
| tpm2? ( |
| chromeos-base/system_api:= |
| chromeos-base/trunks:=[test?] |
| ) |
| " |
| |
| src_install() { |
| # Installs the utilities executable. |
| insinto /usr/local/bin |
| doins "${OUT}/tpm_softclear" |
| chmod u+x "${D}/usr/local/bin/tpm_softclear" |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/tpm_softclear_utils_testrunner" |
| } |