google-cloud-cli-bin: symlink properly, anthoscli optional
This commit is contained in:
parent
1c6f5410f7
commit
a650de7b04
1 changed files with 39 additions and 14 deletions
|
@ -3,6 +3,11 @@
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{10..13} python3_13t )
|
||||||
|
|
||||||
|
inherit python-single-r1
|
||||||
|
|
||||||
DESCRIPTION="Interact with the Google Cloud Platform"
|
DESCRIPTION="Interact with the Google Cloud Platform"
|
||||||
HOMEPAGE="https://cloud.google.com/cli"
|
HOMEPAGE="https://cloud.google.com/cli"
|
||||||
SITE="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"
|
SITE="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"
|
||||||
|
@ -13,22 +18,42 @@ arm64? ( ${SITE}/google-cloud-cli-${PV}-linux-arm.tar.gz )
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="amd64 arm64 arm"
|
KEYWORDS="amd64 arm64"
|
||||||
|
IUSE="anthoscli"
|
||||||
QA_PREBUILT="
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||||
google-cloud-sdk/bin/anothoscli
|
DEPEND="
|
||||||
google-cloud-sdk/bin/gcloud-crc32c
|
virtual/libcrypt:=
|
||||||
|
${PYTHON_DEPS}
|
||||||
"
|
"
|
||||||
RESTRICT="bindist mirror"
|
RDEPEND="${DEPEND}"
|
||||||
S="${WORKDIR}"
|
RESTRICT="bindist mirror strip"
|
||||||
|
S="${WORKDIR}/google-cloud-sdk"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
rm -rf deb rpm install.*
|
||||||
|
rm -rf "platform/gsutil/third_party/crcmod_osx"
|
||||||
|
rm -rf "platform/bundledpythonunix"
|
||||||
|
find -type d -name "python2" -prune -exec rm -rf "{}" \;
|
||||||
|
|
||||||
|
use anthoscli || rm bin/anthoscli
|
||||||
|
|
||||||
|
python_fix_shebang --force .
|
||||||
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
mkdir -p "${D}/opt/google-cloud-sdk"
|
dodir /usr/share/google-cloud-sdk
|
||||||
cp -r "${S}/google-cloud-sdk/"* "${D}/opt/google-cloud-sdk" || die "Install failed!"
|
cp -R "${S}/" "${ED}/usr/share/" || die "Install failed!"
|
||||||
|
|
||||||
dosym "${D}/opt/google-cloud-sdk/bin/gcloud" /usr/bin/gcloud
|
dosym "../share/google-cloud-sdk/bin/gcloud" /usr/bin/gcloud
|
||||||
dosym "${D}/opt/google-cloud-sdk/bin/gsutil" /usr/bin/gsutil
|
dosym "../share/google-cloud-sdk/bin/gcloud-crc32c" /usr/bin/gcloud-crc32c
|
||||||
|
dosym "../share/google-cloud-sdk/bin/gsutil" /usr/bin/gsutil
|
||||||
|
dosym "../share/google-cloud-sdk/bin/bq" /usr/bin/bq
|
||||||
|
dosym "../share/google-cloud-sdk/bin/docker-credential-gcloud" /usr/bin/docker-credential-gcloud
|
||||||
|
dosym "../share/google-cloud-sdk/bin/git-credential-gcloud.sh" /usr/bin/git-credential-gcloud.sh
|
||||||
|
|
||||||
chmod 4755 "${D}/opt/google-cloud-sdk/bin/gsutil"
|
use anthoscli && dosym "../share/google-cloud-sdk/bin/anthoscli" /usr/bin/anthoscli
|
||||||
chmod 4755 "${D}/opt/google-cloud-sdk/bin/gcloud"
|
|
||||||
}
|
python_optimize "${ED}/usr/share/google-cloud-sdk"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue