| # Copyright 2017 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| CROS_WORKON_COMMIT="1da1cad5d615cf74bc411e73d09db73d00413d33" |
| CROS_WORKON_TREE=("eaed4f3b0a8201ef3951bf1960728885ff99e772" "825bff5c29fdc54d4b79cf09b0b8008ba64303b4" "22516c22296d08f9e9ad327c1a4452a6657dc6ea" "216a5d3a60a3b3093fb5ad72142a9bbdc12db2c7" "a94b40bd01e52a5212ebe6a214a01fc6a88652c8" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb") |
| CROS_WORKON_USE_VCSID="1" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| # TODO(crbug.com/809389): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="common-mk trunks libhwsec metrics u2fd .gn" |
| |
| PLATFORM_SUBDIR="u2fd" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="U2FHID Emulation Daemon" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/u2fhid" |
| |
| LICENSE="BSD-Google" |
| KEYWORDS="*" |
| IUSE="fuzzer" |
| |
| COMMON_DEPEND=" |
| chromeos-base/attestation:= |
| chromeos-base/attestation-client:= |
| chromeos-base/cbor:= |
| chromeos-base/libhwsec:= |
| >=chromeos-base/metrics-0.0.1-r3152:= |
| chromeos-base/power_manager-client:= |
| chromeos-base/trunks:= |
| dev-libs/hidapi:= |
| " |
| |
| RDEPEND="${COMMON_DEPEND}" |
| |
| DEPEND="${COMMON_DEPEND} |
| chromeos-base/attestation-client:= |
| >=chromeos-base/protofiles-0.0.43:= |
| chromeos-base/system_api:=[fuzzer?] |
| " |
| |
| pkg_setup() { |
| # Has to be done in pkg_setup() instead of pkg_preinst() since |
| # src_install() needs the u2f user and group. |
| enewuser "u2f" |
| enewgroup "u2f" |
| cros-workon_pkg_setup |
| } |
| |
| src_install() { |
| dobin "${OUT}"/u2fd |
| |
| insinto /etc/init |
| doins init/*.conf |
| |
| insinto /etc/dbus-1/system.d |
| doins org.chromium.U2F.conf |
| |
| local daemon_store="/etc/daemon-store/u2f" |
| dodir "${daemon_store}" |
| fperms 0700 "${daemon_store}" |
| fowners u2f:u2f "${daemon_store}" |
| |
| platform_fuzzer_install "${S}"/OWNERS "${OUT}"/u2f_adpu_fuzzer |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/u2fd_test_runner" |
| } |