60 lines
1.2 KiB
Bash
60 lines
1.2 KiB
Bash
# Copyright 1999-2020 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
PYTHON_COMPAT=( python3_{6..9} )
|
|
|
|
inherit python-r1
|
|
|
|
DESCRIPTION="Versatile replacement for vmstat, iostat and ifstat"
|
|
HOMEPAGE="https://github.com/scottchiefbaker/dool"
|
|
COMMIT=6b89f2d0b6e38e1c8d706e88a12e020367f5100d
|
|
SRC_URI="https://github.com/scottchiefbaker/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
|
MY_P="${PN}-${COMMIT}"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS="~alpha amd64 ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~x86-linux"
|
|
IUSE="doc examples"
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
|
|
RDEPEND="${PYTHON_DEPS}
|
|
dev-python/six[${PYTHON_USEDEP}]"
|
|
DEPEND="${RDEPEND}"
|
|
S="${WORKDIR}/${MY_P}"
|
|
|
|
src_prepare() {
|
|
|
|
# bug fix: allow delay to be specified
|
|
# backport from: https://github.com/dagwieers/dstat/pull/167/files
|
|
sed -i -e 's; / op\.delay; // op.delay;' "dool" || die
|
|
|
|
sed -i -e 's;dstat\.1;dool.1;' docs/Makefile || die
|
|
|
|
default
|
|
}
|
|
|
|
src_install() {
|
|
python_foreach_impl python_doscript dool
|
|
|
|
insinto /usr/share/dool
|
|
newins dool dool.py
|
|
doins plugins/dool_*.py
|
|
|
|
doman docs/dool.1
|
|
|
|
einstalldocs
|
|
|
|
if use examples; then
|
|
dodoc examples/{mstat,read}.py
|
|
fi
|
|
if use doc; then
|
|
dodoc docs/*.html
|
|
fi
|
|
}
|
|
|
|
src_test() {
|
|
python_foreach_impl emake test
|
|
}
|