blob: f7603c1aee59f3013ad51f56cf95f018fbbb236c [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_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_DESTDIR="${S}/platform2"
CROS_WORKON_SUBTREE="common-mk pciguard .gn"
PLATFORM_SUBDIR="pciguard"
inherit cros-workon platform user
DESCRIPTION="Chrome OS External PCI device security daemon"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/pciguard/"
LICENSE="BSD-Google"
SLOT=0
KEYWORDS="~*"
DEPEND="
chromeos-base/session_manager-client:=
chromeos-base/system_api:=
"
src_install() {
# Install the binary
dosbin "${OUT}"/pciguard
# Install the seccomp policy
insinto /usr/share/policy
newins "${S}/seccomp/pciguard-seccomp-${ARCH}.policy" pciguard-seccomp.policy
# Install the upstart configuration files
insinto /etc/init
doins "${S}"/init/*.conf
# Install the dbus configuration
insinto /etc/dbus-1/system.d
doins "${S}/dbus/pciguard-dbus.conf"
}
pkg_preinst() {
enewuser pciguard
enewgroup pciguard
cros-workon_pkg_setup
}
platform_pkg_test() {
platform_test "run" "${OUT}/pciguard_testrunner"
}