| # Copyright 2014 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="dbb1136242ba822d539eaf11493f3b68815adb7f" |
| CROS_WORKON_TREE=("60fa47aebd6ebfb702012849bd560717fceddcd4" "46debaa1a374952167d5a2ca0bdf36013f053bc3" "2e72f56ad37eadb01ad2b42e9938beb23cb3a389" "2e036f417afe5d55dcbd138f7bfe2c98ab14403f" "8ca9c97a07408fdff5abf480fb1b2a15405b6bc0" "509fcdecd3a70e50e5aa4e48d65de2dbd6decdb9" "944879c9353c2df8adb7022407a8d319671325c1" "0c8e3de65339e7e6a1ffe16a54c7ae719bacc57c" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(crbug.com/809389): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="common-mk attestation chaps libhwsec libhwsec-foundation metrics tpm_manager trunks .gn" |
| |
| PLATFORM_SUBDIR="attestation" |
| |
| inherit cros-workon libchrome platform user |
| |
| DESCRIPTION="Attestation service for Chromium OS" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/attestation/" |
| |
| LICENSE="Apache-2.0" |
| KEYWORDS="*" |
| IUSE="generic_tpm2 test ti50_onboard tpm tpm_dynamic tpm2" |
| |
| REQUIRED_USE=" |
| tpm_dynamic? ( tpm tpm2 ) |
| !tpm_dynamic? ( ?? ( tpm tpm2 ) ) |
| " |
| |
| RDEPEND=" |
| tpm? ( |
| app-crypt/trousers:= |
| ) |
| tpm2? ( |
| chromeos-base/trunks:= |
| ) |
| chromeos-base/chaps:= |
| chromeos-base/libhwsec:=[test?] |
| chromeos-base/libhwsec-foundation:= |
| chromeos-base/system_api:=[fuzzer?] |
| >=chromeos-base/metrics-0.0.1-r3152:= |
| chromeos-base/minijail:= |
| chromeos-base/tpm_manager:= |
| chromeos-base/attestation-client |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/vboot_reference:= |
| tpm2? ( |
| chromeos-base/trunks:=[test?] |
| chromeos-base/chromeos-ec-headers:= |
| ) |
| " |
| |
| pkg_preinst() { |
| # Create user and group for attestation. |
| enewuser "attestation" |
| enewgroup "attestation" |
| # Create group for /mnt/stateful_partition/unencrypted/preserve. |
| enewgroup "preserve" |
| } |
| |
| src_install() { |
| platform_install |
| |
| insinto /usr/include/attestation/common |
| doins common/attestation_interface.h |
| doins "${OUT}"/gen/attestation/common/print_attestation_ca_proto.h |
| doins "${OUT}"/gen/attestation/common/print_interface_proto.h |
| doins "${OUT}"/gen/attestation/common/print_keystore_proto.h |
| |
| # Install the generated dbus-binding for fake pca agent. |
| # It does no harm to install the header even for non-test image build. |
| insinto /usr/include/attestation/pca-agent/dbus_adaptors |
| doins "${OUT}"/gen/include/attestation/pca-agent/dbus_adaptors/org.chromium.PcaAgent.h |
| } |
| |
| platform_pkg_test() { |
| platform test_all |
| } |