| # Copyright 2017 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c" |
| CROS_WORKON_TREE=("41d899585b7a07ea908a0cca2944a7b8a4d13655" "a9387abae458aafbe264f7ee5733b0c1bd3d0466" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6") |
| 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..9} ) |
| |
| inherit cros-workon platform distutils-r1 |
| |
| DESCRIPTION="Python wrapper of hammerd API and some python utility scripts." |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/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() { |
| # platform_src_install omitted, to avoid conflicts with |
| # chromeos-base/hammerd. |
| |
| # 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" |
| } |