blob: 8a05f6d05eb2e2db33b6adfc1082f2bff725d0a6 [file] [log] [blame]
# Copyright 2021 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="f35f2919309cf11b0ddd9deb24a6b145d40d9254"
CROS_WORKON_TREE=("a625767bb59509159091f2ab0b71f8b9b4b2e353" "4a0dedab080195bdc122d2289118df4af3ddca2c" "fb2b8277318fb7e7eff84f5c7669a46bf60f19f5" "b1c7898d3f42051cbba6426c62b35476a8de5b72" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
# TODO(crbug/1184685): "libhwsec" is not necessary; remove it after solving
# the bug.
CROS_WORKON_SUBTREE="common-mk metrics libhwsec libhwsec-foundation .gn"
PLATFORM_SUBDIR="libhwsec-foundation"
inherit cros-workon platform
DESCRIPTION="Crypto and utility functions used in TPM related daemons."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/libhwsec-foundation/"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="test tpm tpm_dynamic tpm2"
RDEPEND="
>=chromeos-base/metrics-0.0.1-r3152
chromeos-base/system_api
chromeos-base/tpm_manager-client
"
src_install() {
# Install header files.
local header_dirs=(
.
status
status/impl
syscaller
tpm_error
utility
error
tpm
)
local d
for d in "${header_dirs[@]}" ; do
insinto /usr/include/libhwsec-foundation/"${d}"
doins "${d}"/*.h
done
dolib.so "${OUT}"/lib/libhwsec-foundation.so
dosbin "${OUT}"/tpm_version_client
if use tpm_dynamic; then
dosbin tool/tpm_version
insinto /etc/init
doins init/no-tpm-checker.conf
fi
}
platform_pkg_test() {
local tests=(
hwsec-foundation_testrunner
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}