2020-09-12 05:32:59 +02:00
|
|
|
# Copyright 1999-2020 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
MY_PN="scripts"
|
|
|
|
|
|
|
|
inherit eutils git-r3
|
|
|
|
|
|
|
|
DESCRIPTION="Small scripts from src_prepare group"
|
|
|
|
HOMEPAGE="https://gitlab.com/src_prepare/scripts"
|
|
|
|
EGIT_REPO_URI="https://gitlab.com/src_prepare/${MY_PN}.git"
|
|
|
|
|
2020-09-17 00:37:41 +02:00
|
|
|
RESTRICT="
|
|
|
|
mirror
|
|
|
|
!test? ( test )
|
|
|
|
"
|
2020-09-12 05:32:59 +02:00
|
|
|
LICENSE="ISC"
|
|
|
|
SLOT="0"
|
2020-09-17 00:37:41 +02:00
|
|
|
IUSE="test"
|
2020-09-12 05:32:59 +02:00
|
|
|
|
2020-09-17 00:37:41 +02:00
|
|
|
RDEPEND="
|
2020-09-12 05:32:59 +02:00
|
|
|
app-shells/bash:*
|
|
|
|
"
|
2020-09-17 00:37:41 +02:00
|
|
|
DEPEND="
|
|
|
|
${RDEPEND}
|
|
|
|
test? (
|
|
|
|
dev-python/pylint
|
|
|
|
|| (
|
|
|
|
dev-util/shellcheck
|
|
|
|
dev-util/shellcheck-bin
|
|
|
|
)
|
|
|
|
)
|
2020-09-12 05:32:59 +02:00
|
|
|
"
|
|
|
|
|
2020-09-17 00:37:41 +02:00
|
|
|
src_test() {
|
|
|
|
bash ./test.sh || die "Tests failed"
|
|
|
|
}
|
|
|
|
|
2020-09-12 05:32:59 +02:00
|
|
|
src_install() {
|
|
|
|
# Install the docs
|
2020-09-12 17:20:00 +02:00
|
|
|
local doc
|
2020-09-12 05:32:59 +02:00
|
|
|
for doc in *.md
|
|
|
|
do
|
|
|
|
dodoc "${doc}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install the scripts
|
|
|
|
if pushd src
|
|
|
|
then
|
|
|
|
local script
|
|
|
|
for script in *
|
|
|
|
do
|
|
|
|
exeinto "/opt/${PN}"
|
|
|
|
doexe "${script}"
|
|
|
|
dosym "../../opt/${PN}/${script}" "/usr/bin/src_prepare-${script}"
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
else
|
2020-09-12 17:20:00 +02:00
|
|
|
die "There is no ${S}/src directory"
|
2020-09-12 05:32:59 +02:00
|
|
|
fi
|
|
|
|
}
|