net/google-cloud-sdk: Install Bash & Zsh completion files

Approved by:	swills (maintainer)
Differential Revision:	https://reviews.freebsd.org/D27586
This commit is contained in:
Mateusz Piotrowski 2020-12-27 15:01:53 +00:00
parent ecd3c83a05
commit b9ea0762ee
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=559364

View File

@ -2,6 +2,7 @@
PORTNAME= google-cloud-sdk
PORTVERSION= 321.0.0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/
DISTNAME= google-cloud-sdk-${PORTVERSION}-linux-x86_64
@ -26,6 +27,12 @@ PLIST_FILES= bin/bq \
bin/git-credential-gcloud.sh \
bin/gsutil
OPTIONS_DEFINE= BASH ZSH
OPTIONS_DEFAULT= BASH ZSH
BASH_PLIST_FILES= share/bash-completion/completions/gcloud
ZSH_PLIST_FILES= share/zsh/site-functions/_gcloud
post-extract:
@${RM} -r \
${WRKSRC}/bin/anthoscli \
@ -53,4 +60,14 @@ post-install:
@(cd ${STAGEDIR}${PREFIX} && \
${FIND} -s google-cloud-sdk -type f -o -type l >> ${TMPPLIST})
post-install-BASH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
${RLN} ${STAGEDIR}${PREFIX}/google-cloud-sdk/completion.bash.inc \
${STAGEDIR}${PREFIX}/share/bash-completion/completions/gcloud
post-install-ZSH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${RLN} ${STAGEDIR}${PREFIX}/google-cloud-sdk/completion.zsh.inc \
${STAGEDIR}${PREFIX}/share/zsh/site-functions/_gcloud
.include <bsd.port.mk>