blob: 680fb0006906315f2421072494acb6bb9a5dcb5e [file] [log] [blame]
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_USE_VCSID=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_DESTDIR="${S}/platform2"
PLATFORM_SUBDIR="trunks"
inherit cros-workon platform user
DESCRIPTION="Trunks service for Chromium OS"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="~*"
IUSE="test"
RDEPEND="
chromeos-base/libchromeos
chromeos-base/system_api
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/gmock )
dev-cpp/gtest
"
src_install() {
insinto /etc/dbus-1/system.d
doins org.chromium.Trunks.conf
insinto /etc/init
doins trunksd.conf
dosbin "${OUT}"/trunks_client
dosbin "${OUT}"/trunksd
insinto /usr/share/policy
newins trunksd-seccomp-${ARCH}.policy trunksd-seccomp.policy
}
platform_pkg_test() {
local tests=(
trunks_testrunner
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}
pkg_preinst() {
enewuser trunks
enewgroup trunks
}