| # Copyright 2017 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=5 |
| CROS_WORKON_COMMIT="3ee7fe06fcaad49259c254006feb1ff503f5875a" |
| CROS_WORKON_TREE=("bf84a23a00350764b97d4ceb2bee5c17164d7855" "b13f03a60c0287876790e11f78840e42341cfebd" "7ce3690fd23cb166ae63fdb47082534bd91db3e4" "2ef8c76a9973bfaf5f829b97f0668ad2d4c77aa1" "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 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" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| RDEPEND=" |
| chromeos-base/libbrillo |
| chromeos-base/metrics |
| chromeos-base/power_manager-client |
| chromeos-base/trunks |
| dev-libs/hidapi |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/system_api |
| " |
| |
| 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}" |
| } |