blob: bee84b669daf6d45abba1c309112d909e6cfacba [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=7
PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
inherit distutils-r1
SRC_URI="https://github.com/sosreport/sos/archive/${PV}.tar.gz -> ${P}.tar.gz"
DESCRIPTION="An extensible, portable, support data collection tool."
HOMEPAGE="https://github.com/sosreport/sos"
LICENSE="GPL-2"
KEYWORDS="*"
SLOT="0"
IUSE="nls"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
"
RDEPEND="
dev-python/pexpect[${PYTHON_USEDEP}]
>=dev-python/python-magic-0.4.20[${PYTHON_USEDEP}]
"
S="${WORKDIR}/sos-${PV}"
PATCHES=(
"${FILESDIR}/0009-prevent-sos.conf-to-be-installed-automatically.patch"
"${FILESDIR}/0010-add-package-manager-for-COS.patch"
)
src_prepare() {
distutils-r1_src_prepare
if ! use nls ; then
rm po/*.po
fi
}
python_install() {
distutils-r1_python_install
# Provide default config file.
insinto /etc/sos/
doins "${FILESDIR}"/sos.conf
}