blob: 9f801fdf32d9159f5a9a29122855bf59ab801c21 [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="fd69c2f9787569b44f1b718593443662a30633b4"
CROS_WORKON_TREE="dc342a511c5df3e803778f6cba03181b6bacf1b0"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_DESTDIR="${S}"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="regions"
PLATFORM_SUBDIR="regions"
inherit cros-workon
DESCRIPTION="Chromium OS Region Data"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/regions/"
LICENSE="BSD-Google"
KEYWORDS="*"
# 'jq' allows command line tools to access the JSON database.
RDEPEND="app-misc/jq"
DEPEND=""
src_unpack() {
cros-workon_src_unpack
S+="/regions"
}
src_compile() {
./regions.py --format=json --output "${WORKDIR}/cros-regions.json"
}
src_test() {
./regions_unittest.py
}
src_install() {
dobin cros_region_data
insinto /usr/share/misc
doins "${WORKDIR}/cros-regions.json"
}