| # 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="9a2de0d377fdae131802e2c260721d2203d78009" |
| CROS_WORKON_TREE=("eaed4f3b0a8201ef3951bf1960728885ff99e772" "4e55b3eb76e4c2c119f567a6826718712f0f6b21" "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 tpm2-simulator .gn" |
| |
| PLATFORM_SUBDIR="tpm2-simulator" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="TPM 2.0 Simulator" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/tpm2-simulator/" |
| |
| LICENSE="BSD-Google" |
| SLOT="0/0" |
| KEYWORDS="*" |
| |
| COMMON_DEPEND=" |
| dev-libs/openssl:0= |
| " |
| |
| RDEPEND="${COMMON_DEPEND}" |
| DEPEND=" |
| chromeos-base/tpm2:=[tpm2_simulator,tpm2_simulator_manufacturer] |
| chromeos-base/vboot_reference:=[tpm2_simulator] |
| ${COMMON_DEPEND} |
| " |
| |
| src_install() { |
| # Install init scripts |
| insinto /etc/init |
| doins init/tpm2-simulator.conf |
| |
| # Install executables |
| dobin "${OUT}"/tpm2-simulator |
| dobin "${OUT}"/tpm2-simulator-init |
| |
| # Install seccomp policy for cryptohome-proxy |
| insinto /usr/share/policy |
| newins "seccomp/tpm2-simulator-${ARCH}.policy" tpm2-simulator.policy |
| } |
| |
| pkg_preinst() { |
| enewuser tpm2-simulator |
| enewgroup tpm2-simulator |
| } |