blob: 6cad5676968cf8d131907a14f723d02f52713f77 [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="6f9011123f3656c45bb34148673aa110a22326b3"
CROS_WORKON_TREE=("791c6808b4f4f5f1c484108d66ff958d65f8f1e3" "8f8f3fd6e34931380cbc9f35bf9f2bb74d9c7c8b" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
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"
}