Skip to content

Commit

Permalink
app-misc/google-cloud-cli: add 469.0.0, drop 467.0.0
Browse files Browse the repository at this point in the history
Also:
* Add useflag to make anthoscli command optional to save space
* Create symlinks for all commands
  • Loading branch information
SuperTux88 committed Mar 25, 2024
1 parent 89848c0 commit 48c947f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app-misc/google-cloud-cli/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DIST google-cloud-cli-467.0.0-linux-x86_64.tar.gz 206577742 BLAKE2B 791c7b9ae890a46dffc58bfa53632bae8ec1bf430d2d8bab40399f07423f265f46ac91d77bf9cb2b20089c1feca9336e2f583b383f544ec078a29108b4670a78 SHA512 0570df448484289f75bc5c5f2766a4310d02e86fa997a9a50dbec2304330877023fb64d62a0f57d7861e8f0dc46c08a1c9402f36eeeb9a3d4670eb4e2202660c
DIST google-cloud-cli-469.0.0-linux-x86_64.tar.gz 207088175 BLAKE2B 50710e7d4d77ae2661e70a8f66d23a33fad66422a41eba1a832f0ba1f316390942680815ef0f9fb9d3d7455537e044be8f5d3924a597282383824fab1bdfc145 SHA512 94f9edba17eb8ccb676f61ecd29a46755d6c4dd3eec31000f18e6f7b12492cfddbbbe94dbf9344638fbd11e97cdbeae2bc5495863d25920114139a100b8835f5
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ PYTHON_COMPAT=( python3_{10..12} )

inherit python-single-r1

DESCRIPTION="Google Cloud SDK"
DESCRIPTION="Google Cloud CLI"
HOMEPAGE="https://cloud.google.com/sdk/"
SRC_URI="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${P}-linux-x86_64.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="anthoscli"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DEPEND="${PYTHON_DEPS}"
Expand All @@ -24,21 +25,28 @@ S="${WORKDIR}/google-cloud-sdk"
src_prepare() {
default

rm -rf deb rpm install.*
rm -rf "platform/gsutil/third_party/crcmod_osx"

rm -rf "platform/gsutil_py2"
rm -rf "platform/bundledpythonunix"
find -type d -name "python2" -prune -exec rm -rf "{}" \;

rm -rf "platform/bundledpythonunix"
use anthoscli || rm bin/anthoscli

python_fix_shebang --force .
}

src_install() {
dodir /usr/share/google-cloud-sdk
cp -R "${S}/" "${ED}/usr/share/" || die "Install failed!"

dosym "../share/google-cloud-sdk/bin/gcloud" /usr/bin/gcloud
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

use anthoscli && dosym "../share/google-cloud-sdk/bin/anthoscli" /usr/bin/anthoscli

python_optimize "${ED}/usr/share/google-cloud-sdk"
}
3 changes: 3 additions & 0 deletions app-misc/google-cloud-cli/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
<name>Benjamin Neff</name>
<email>[email protected]</email>
</maintainer>
<use>
<flag name="anthoscli">Install anthoscli command</flag>
</use>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
DEFINED_PHASES=install prepare setup
DEPEND=python_single_target_python3_10? ( dev-lang/python:3.10 ) python_single_target_python3_11? ( dev-lang/python:3.11 ) python_single_target_python3_12? ( dev-lang/python:3.12 )
DESCRIPTION=Google Cloud SDK
DESCRIPTION=Google Cloud CLI
EAPI=8
HOMEPAGE=https://cloud.google.com/sdk/
INHERIT=python-single-r1
IUSE=python_single_target_python3_10 python_single_target_python3_11 python_single_target_python3_12
IUSE=anthoscli python_single_target_python3_10 python_single_target_python3_11 python_single_target_python3_12
KEYWORDS=~amd64
LICENSE=Apache-2.0
RDEPEND=python_single_target_python3_10? ( dev-lang/python:3.10 ) python_single_target_python3_11? ( dev-lang/python:3.11 ) python_single_target_python3_12? ( dev-lang/python:3.12 )
REQUIRED_USE=^^ ( python_single_target_python3_10 python_single_target_python3_11 python_single_target_python3_12 )
SLOT=0
SRC_URI=https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-467.0.0-linux-x86_64.tar.gz
SRC_URI=https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-469.0.0-linux-x86_64.tar.gz
_eclasses_=multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe toolchain-funcs e56c7649b804f051623c8bc1a1c44084 multilib c19072c3cd7ac5cb21de013f7e9832e0 python-utils-r1 8904b60325f22500b0c3ad4b68a42448 python-single-r1 75118e916668a74c660a13b0ecb22562
_md5_=6b264533e785d9797019ca1d87369de9
_md5_=e7eac01457f2c48dff1b068de877046f

0 comments on commit 48c947f

Please sign in to comment.