blob: 1d1051f0da59a48e5302e712bde77da576e845e9 [file] [log] [blame]
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_COMMIT="dfb158fc24a794eb1fe2c7f2fbd6e6a618682af7"
CROS_WORKON_TREE="e83f453e5b43ff07ab85877e5acd1e4435ad9f92"
CROS_WORKON_PROJECT="chromiumos/platform/factory"
CROS_WORKON_LOCALNAME="factory"
CROS_WORKON_OUTOFTREE_BUILD=1
inherit cros-workon
DESCRIPTION="ChromeOS Regions"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
DEPEND="chromeos-base/chromeos-factory"
src_compile() {
# Disable default compile, since that would call "make"
# in the factory source tree.
true
}
src_install() {
local target_dir="${D}/usr/local/factory/share"
mkdir -p "${target_dir}"
# Run regions.py from the SYSROOT, since only there will it have
# the complete list of regions including those from the
# overlay.
local regions_py="${SYSROOT}/usr/local/factory/py/l10n/regions.py"
export PYTHONDONTWRITEBYTECODE=1
# Generate list of confirmed regions.
"${regions_py}" --format yaml > "${target_dir}/regions.yaml" || die
# Generate list of all regions, including unconfimed ones.
"${regions_py}" --format yaml --all > "${target_dir}/regions_all.yaml" \
|| die
}