blob: 4958eaf8a2f4ac84fa146f16691252462c546e90 [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="8c41e449b4268d2f6ebe41726c10fa1d627f79e9"
CROS_WORKON_TREE="0d73ebc1097998d67e52f7316c1328c41f155127"
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/"*
}