blob: eae446671daeca49c0cafc344c4ede06f238138d [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="371b69af12a9cb2f27f8e3376e28f7a48d0dc896"
CROS_WORKON_TREE="8ba4aa7159d55dabf6cfd74f23752476793bc91d"
CROS_WORKON_PROJECT="chromiumos/chromite"
CROS_WORKON_LOCALNAME="../../chromite"
inherit cros-workon python
DESCRIPTION="Service health checking tool for Moblab"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
RDEPEND="
>=chromeos-base/chromite-0.0.2
"
DEPEND=""
src_install() {
MOBMONITOR_SITEDIR="$(python_get_sitedir)/chromite/mobmonitor"
# Copy the mobmonitor source.
insinto "${MOBMONITOR_SITEDIR}"
doins -r "${S}/mobmonitor"/*
# Clean up unwanted files.
cd "${D}/${MOBMONITOR_SITEDIR}"
find '(' -name '*.pyc' -o -name '*unittest.py' ')' -delete
# Create executable Mob* Monitor scripts.
newbin "${MOBMONITOR_SITEDIR}/scripts/mobmonitor.py" "mobmonitor"
newbin "${MOBMONITOR_SITEDIR}/scripts/mobmoncli.py" "mobmoncli"
# Create the Mob* Monitor check file directory.
dodir "/etc/mobmonitor/checkfiles/"
# Copy the static content for the web interface.
insinto "/etc/mobmonitor/static/"
doins -r "${S}/mobmonitor/static/"*
}