blob: c07826ea78097ddcbd8d037771c98657d545cc48 [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="5bbbe52a139486abcbd802b9bd3f6763dac479b3"
CROS_WORKON_TREE=("ef118ceb3e8ebcc8b8a4ae6577a71d7ad210a722" "3cafdc3ab4b41698c9ae4a290ee3cd85cd5867d5" "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"
}