blob: fe72c9a380e5e919c2d079d13eb1d3f50b768d46 [file] [log] [blame]
# Copyright 2013 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c"
CROS_WORKON_TREE=("41d899585b7a07ea908a0cca2944a7b8a4d13655" "faa5b8036561b66b5b9d79ea1af8a95927a0ae0f" "2a9c447bda70ed2d8efd8145b418458531b8a118" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_OUTOFTREE_BUILD=1
# TODO(crbug.com/809389): Avoid directly including headers from other packages.
CROS_WORKON_SUBTREE="common-mk metrics p2p .gn"
PLATFORM_SUBDIR="p2p"
inherit cros-debug cros-workon platform user
DESCRIPTION="Chromium OS P2P"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/p2p/"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0/0"
KEYWORDS="*"
IUSE=""
COMMON_DEPEND=">=chromeos-base/metrics-0.0.1-r3152:=
dev-libs/glib:=
net-dns/avahi-daemon:=
net-firewall/iptables:="
RDEPEND="${COMMON_DEPEND}"
DEPEND="${COMMON_DEPEND}"
platform_pkg_test() {
local tests=(
p2p-client-unittests
p2p-server-unittests
p2p-http-server-unittests
p2p-common-unittests
)
local test_bin
cd "${OUT}"
for test_bin in "${tests[@]}"; do
platform_test "run" "./${test_bin}"
done
}
pkg_preinst() {
# Groups are managed in the central account database.
enewgroup p2p
enewuser p2p
}
src_install() {
platform_src_install
dosbin "${OUT}"/p2p-client
dosbin "${OUT}"/p2p-server
dosbin "${OUT}"/p2p-http-server
insinto /etc/init
doins data/p2p.conf
# Install fuzzer
local fuzzer_component_id="908319"
platform_fuzzer_install "${S}"/OWNERS \
"${OUT}"/p2p_http_server_fuzzer \
--comp "${fuzzer_component_id}"
}