diff --git a/app-portage/src_prepare-scripts/Manifest b/app-portage/src_prepare-scripts/Manifest new file mode 100644 index 0000000..c68cdea --- /dev/null +++ b/app-portage/src_prepare-scripts/Manifest @@ -0,0 +1 @@ +DIST scripts-1.0.0.tar.gz 22058 BLAKE2B 333b9bf3e699e78f2638ee6e339672d7544104a0257950593f4283f0dc2266fb4989665c2da4342fe6802c54c101d0369d652b47a9ecd2772e89f6872f5d8126 SHA512 d427a705675578c952390f1a351d648efb34d84030ba5f9cf592632684423041fa13e40b628c89bb8526a7b112acdbb33f9c06fc7be84c7ca934a772213bd235 diff --git a/app-portage/src_prepare-scripts/src_prepare-scripts-1.0.0.ebuild b/app-portage/src_prepare-scripts/src_prepare-scripts-1.0.0.ebuild new file mode 100644 index 0000000..646281a --- /dev/null +++ b/app-portage/src_prepare-scripts/src_prepare-scripts-1.0.0.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..8} ) + +inherit git-r3 python-r1 + +DESCRIPTION="Small scripts from src_prepare group" +HOMEPAGE="https://gitlab.com/src_prepare/scripts" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/src_prepare/scripts.git" +else + SRC_URI="https://gitlab.com/src_prepare/scripts/-/archive/${PV}/scripts-${PV}.tar.gz" + KEYWORDS="~amd64" +fi + +RESTRICT=" + mirror + !test? ( test ) +" +LICENSE="GPL-3" +SLOT="0" +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + app-admin/eselect + app-portage/eix + app-portage/euscan-ng + app-portage/repoman + app-shells/bash:* + dev-lang/perl + dev-util/pkgcheck + sys-apps/portage +" +DEPEND=" + test? ( + dev-python/pylint + || ( + dev-util/shellcheck + dev-util/shellcheck-bin + ) + ) +" + +src_test() { + bash ./test.sh || die "Tests failed" +} + +src_install() { + # Install the docs + local doc + for doc in *.md + do + dodoc "${doc}" + done + + # Install the scripts + local P_HOME="opt/${PN}" + if pushd src + then + local script + for script in * + do + exeinto "${P_HOME}" + doexe "${script}" + dosym "../../${P_HOME}/${script}" "/usr/bin/src_prepare-${script}" + done + popd + else + die "There is no ${S}/src directory" + fi +} diff --git a/app-portage/src_prepare-scripts/src_prepare-scripts-9999.ebuild b/app-portage/src_prepare-scripts/src_prepare-scripts-9999.ebuild index a5f7138..646281a 100644 --- a/app-portage/src_prepare-scripts/src_prepare-scripts-9999.ebuild +++ b/app-portage/src_prepare-scripts/src_prepare-scripts-9999.ebuild @@ -1,21 +1,28 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6..8} ) +PYTHON_COMPAT=( python3_{7..8} ) inherit git-r3 python-r1 DESCRIPTION="Small scripts from src_prepare group" HOMEPAGE="https://gitlab.com/src_prepare/scripts" -EGIT_REPO_URI="https://gitlab.com/src_prepare/scripts.git" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/src_prepare/scripts.git" +else + SRC_URI="https://gitlab.com/src_prepare/scripts/-/archive/${PV}/scripts-${PV}.tar.gz" + KEYWORDS="~amd64" +fi RESTRICT=" - binchecks mirror strip + mirror !test? ( test ) " -LICENSE="ISC" +LICENSE="GPL-3" SLOT="0" IUSE="test" REQUIRED_USE="${PYTHON_REQUIRED_USE}"