blob: 3c79cc71b2ddacf3e5d3ba6db64db7753a6a9c84 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="85109a843d7310588ec7feea6775ace121125882"
CROS_WORKON_TREE=("52a8a8b6d3bbca5e90d4761aa308a5541d52b1bb" "4b29e9b6cad8bdca14a0c7b30b204bffcee041c7" "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 hammerd .gn"
PLATFORM_SUBDIR="hammerd"
PYTHON_COMPAT=( python3_{6..8} )
inherit cros-workon platform distutils-r1
DESCRIPTION="Python wrapper of hammerd API and some python utility scripts."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/hammerd/"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="+hammerd_api"
BDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
"
RDEPEND="
chromeos-base/hammerd:=
"
DEPEND="${RDEPEND}"
src_configure() {
platform_src_configure
distutils-r1_src_configure
}
src_compile() {
platform_src_compile
distutils-r1_src_compile
}
src_install() {
# Install exposed API.
dolib.so "${OUT}"/lib/libhammerd-api.so
insinto /usr/include/hammerd/
doins hammerd_api.h
distutils-r1_src_install
# Install hammer base tests on dut
dodir /usr/local/bin/hammertests
cp -R "${S}/hammertests" "${D}/usr/local/bin"
}