| # Copyright 2022 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_SUBTREE="common-mk attestation tpm_manager trunks vtpm .gn" |
| |
| PLATFORM_SUBDIR="vtpm" |
| |
| inherit tmpfiles cros-workon libchrome platform user |
| |
| DESCRIPTION="Virtual TPM service for Chromium OS" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/vtpm/" |
| |
| LICENSE="Apache-2.0" |
| KEYWORDS="~*" |
| IUSE="test" |
| |
| RDEPEND=" |
| chromeos-base/attestation:=[test?] |
| chromeos-base/system_api:= |
| chromeos-base/tpm_manager:= |
| chromeos-base/trunks:= |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/attestation-client:= |
| chromeos-base/trunks:=[test?] |
| " |
| |
| pkg_preinst() { |
| # Create user and group for vtpm. |
| enewuser "vtpm" |
| enewgroup "vtpm" |
| } |
| |
| src_install() { |
| platform_install |
| |
| dotmpfiles tmpflies.d/vtpm.conf |
| } |
| |
| platform_pkg_test() { |
| platform test_all |
| } |