blob: c4b3dd14ff723dc172545fc41c8fdd289330423c [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_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_SUBTREE=".gn hps common-mk"
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=""
RDEPEND="
"
DEPEND="${RDEPEND}
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/*.conf
insinto /etc/dbus-1/system.d
doins daemon/dbus/org.chromium.Hps.conf
}
platform_pkg_test() {
local tests=(
dev_test
hps_test
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test run "${OUT}/${test_bin}"
done
}