blob: ce2e475df704fa6a36aaf3e0332a91b0f6af0f5e [file] [log] [blame]
# Copyright 2021 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c"
CROS_WORKON_TREE=("f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6" "dea67c524ea11921b11a95b258a00f9309c3a683" "41d899585b7a07ea908a0cca2944a7b8a4d13655" "faa5b8036561b66b5b9d79ea1af8a95927a0ae0f")
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 udev user
DESCRIPTION="Chrome OS HPS daemon."
LICENSE="BSD-Google"
KEYWORDS="*"
RDEPEND="
chromeos-base/metrics:=
virtual/libusb:1
"
DEPEND="${RDEPEND}
chromeos-base/system_api:=
"
pkg_preinst() {
enewuser "hpsd"
enewgroup "hpsd"
}
src_install() {
platform_src_install
dosbin "${OUT}"/hpsd
# Install upstart configuration.
insinto /etc/init
doins daemon/init/hpsd.conf
insinto /etc/dbus-1/system.d
doins daemon/dbus/org.chromium.Hps.conf
exeinto "$(get_udevdir)"
doexe udev/*.sh
udev_dorules udev/*.rules
}
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
}