blob: 71330e4049cbed519d05db69b9f58890ead0e1fe [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="d5601d708c5df7c6e6e38ebde5c47af57099db69"
CROS_WORKON_TREE=("e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "2da34f68aa4bdc33e7ba1b1297e582fb7d427dc6" "ef118ceb3e8ebcc8b8a4ae6577a71d7ad210a722" "e08a2eb734e33827dffeecf57eca046cd1091373")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_SUBTREE=".gn hps common-mk metrics"
CROS_WORKON_OUTOFTREE_BUILD="1"
CROS_WORKON_INCREMENTAL_BUILD="1"
PLATFORM_SUBDIR="hps"
inherit cros-workon platform user
DESCRIPTION="Chrome OS HPS daemon."
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="hpsd-roflash"
RDEPEND="
hpsd-roflash? ( dev-embedded/stm32flash:= )
"
DEPEND="${RDEPEND}
chromeos-base/metrics:=
chromeos-base/system_api:=
dev-embedded/libftdi:=
"
pkg_preinst() {
enewuser "hpsd"
enewgroup "hpsd"
}
src_install() {
dosbin "${OUT}"/hpsd
# Install upstart configuration.
insinto /etc/init
doins daemon/init/hpsd.conf
if use hpsd-roflash ; then
doins daemon/init/hpsd_roflash.conf
fi
insinto /etc/dbus-1/system.d
doins daemon/dbus/org.chromium.Hps.conf
}
platform_pkg_test() {
local tests=(
dev_test
hps_test
hps_metrics_test
hps_daemon_test
hps_filter_test
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test run "${OUT}/${test_bin}"
done
}