| # Copyright 2016 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=5 |
| |
| CROS_WORKON_COMMIT="cf65e45c51a11ebd14f39daf0be997f5a0fd90ba" |
| CROS_WORKON_TREE=("9a76761fb376cc658f8589352df93fec6d285267" "4281fd9d9a56ab784600670eff2475ee5248253a" "dc1506ef7c8cfd2c5ffd1809dac05596ec18773c") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_SUBTREE="common-mk chromeos-config .gn" |
| |
| PLATFORM_SUBDIR="chromeos-config" |
| |
| inherit cros-workon platform |
| |
| DESCRIPTION="Chrome OS configuration tools" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/chromeos-config" |
| |
| LICENSE="BSD-Google" |
| SLOT=0 |
| KEYWORDS="*" |
| IUSE="" |
| |
| RDEPEND=" |
| chromeos-base/libbrillo |
| sys-apps/dtc |
| " |
| |
| DEPEND="${RDEPEND}" |
| |
| src_install() { |
| dolib.so "${OUT}/lib/libcros_config.so" |
| |
| insinto "/usr/include/chromeos/chromeos-config/libcros_config" |
| doins "${S}"/libcros_config/*.h |
| |
| "${S}"/platform2_preinstall.sh "${PV}" "/usr/include/chromeos" "${OUT}" |
| insinto "/usr/$(get_libdir)/pkgconfig" |
| doins "${OUT}"/libcros_config.pc |
| |
| insinto "/usr/include/cros_config" |
| doins "libcros_config/cros_config_interface.h" |
| doins "libcros_config/cros_config.h" |
| doins "libcros_config/fake_cros_config.h" |
| |
| dobin "${OUT}"/cros_config |
| } |
| |
| platform_pkg_test() { |
| # Run this here since we may not run cros_config_main_test. |
| ./chromeos-config-test-setup.sh |
| local tests=( |
| fake_cros_config_test |
| cros_config_test |
| cros_config_main_test |
| ) |
| |
| local test_bin |
| for test_bin in "${tests[@]}"; do |
| platform_test "run" "${OUT}/${test_bin}" |
| done |
| ./run_tests.sh || die "cros_config unit tests have errors" |
| } |