# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
description Command-line interface for Google Cloud Platform products and services
long_description ${description}
supported_archs i386 x86_64
homepage https://cloud.google.com/sdk/
master_sites https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/
distname ${name}-${version}-${os.platform}-${configure.build_arch}
checksums rmd160 df20c6343bc14949c0579c0397b9c0e8d07833af \
sha256 ea1bf841892dc89dd24685e281d5c301bf8a764eb41b595ca06279088be4afad \
python.default_version 27
reinplace "s|\"disable_updater\": false|\"disable_updater\": true|" ${worksrcpath}/lib/googlecloudsdk/core/config.json
system -W ${worksrcpath} "CLOUDSDK_CONFIG=${worksrcpath}/.config ./install.sh --usage-reporting false --command-completion false --path-update false --quiet"
set libexecdir ${destroot}${prefix}/libexec/${name}
xinstall -d ${libexecdir}
copy ${worksrcpath}/bin ${worksrcpath}/lib ${worksrcpath}/platform ${libexecdir}
foreach f {gcloud bq gsutil} {
ln -s ../libexec/${name}/bin/${f} ${destroot}${prefix}/bin/${f}
ln -s ../libexec/${name}/bin/git-credential-gcloud.sh ${destroot}${prefix}/bin/git-credential-gcloud
if {[variant_isset bash_completion]} {
# set completions_path ${prefix}/share/bash-completion/completions
set completions_path ${prefix}/etc/bash_completion.d
xinstall -d ${destroot}${completions_path}
xinstall -m 644 ${worksrcpath}/completion.bash.inc ${destroot}${completions_path}/google-cloud-sdk
variant bash_completion {
depends_run-append path:etc/bash_completion:bash-completion
livecheck.url https://cloud.google.com/sdk/docs/quickstart-mac-os-x