blob: 0a291d48a697e205130147703bffa877db5bbfc2 [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="e662acfe42be58d4b6bc95b2a61cd565505dc32e"
CROS_WORKON_TREE="70cbebfbe36749565e402176536f86d63719d47e"
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/"*
}