blob: 4ba69edb3108a833f8f0289fce4cfa47c0f3d120 [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="f082da3632760dd479b56ae74233c163896c5b92"
CROS_WORKON_TREE="067edeb12a34d19613e75cdaf21b0f4cf75818da"
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/"*
}