blob: 90fe3936a0cb80e49fccc51e7cf0fdcefe5de6b6 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="51a4cfa94c4d9755d787cdf97e11a83d0fd5e48e"
CROS_WORKON_TREE=("e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "53751c9a95397ae0542f14eedaa997c3cb3f9078" "cc73b66310636a1163f40ed35f934598ce449e52" "c9de2eb52379383658eaf7cbc29fdb5d8d32eb98")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
# TODO(crbug.com/809389): Remove libmems from this list.
CROS_WORKON_SUBTREE=".gn iioservice libmems common-mk"
CROS_WORKON_OUTOFTREE_BUILD="1"
CROS_WORKON_INCREMENTAL_BUILD="1"
PLATFORM_SUBDIR="iioservice/daemon"
inherit cros-workon platform user
DESCRIPTION="Chrome OS sensor HAL IPC util."
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="+seccomp"
RDEPEND="
chromeos-base/libiioservice_ipc:=
chromeos-base/libmems:=
"
DEPEND="${RDEPEND}
chromeos-base/system_api:=
"
pkg_preinst() {
enewuser "iioservice"
enewgroup "iioservice"
}
src_install() {
dosbin "${OUT}"/iioservice
# Install upstart configuration.
insinto /etc/init
doins init/iioservice.conf
# Install seccomp policy file.
insinto /usr/share/policy
use seccomp && newins "seccomp/iioservice-${ARCH}.policy" iioservice-seccomp.policy
}
platform_pkg_test() {
local tests=(
iioservice_testrunner
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}