1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
freebsd-ports/sysutils/kubectl/Makefile
2022-12-11 18:24:49 +00:00

46 lines
1.5 KiB
Makefile

PORTNAME= kubectl
PORTVERSION= 1.26.0
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
MAINTAINER= danilo@FreeBSD.org
COMMENT= Kubernetes command-line tool
WWW= https://github.com/kubernetes/kubectl
LICENSE= APACHE20
USES= cpe go:modules
CPE_VENDOR= jenkins
CPE_PRODUCT= kubernetes
USE_GITHUB= yes
GH_ACCOUNT= kubernetes
GH_PROJECT= kubernetes
GO_PKGNAME= k8s.io/kubernetes
GO_TARGET= ${GO_PKGNAME}/cmd/${PORTNAME}
GO_BUILDFLAGS= -ldflags="-X k8s.io/component-base/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/component-base/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/component-base/version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ') \
-X k8s.io/component-base/version.gitCommit="" \
-X k8s.io/component-base/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION} \
-X k8s.io/client-go/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION}"
PLIST_FILES= bin/${PORTNAME}
OPTIONS_DEFINE= BASH ZSH
OPTIONS_DEFAULT= BASH ZSH
BASH_PLIST_FILES= share/bash-completion/completions/${PORTNAME}
ZSH_PLIST_FILES= share/zsh/site-functions/_${PORTNAME}
post-install-BASH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
${STAGEDIR}${PREFIX}/bin/${PORTNAME} completion bash > ${STAGEDIR}${PREFIX}/share/bash-completion/completions/${PORTNAME}
post-install-ZSH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${STAGEDIR}${PREFIX}/bin/${PORTNAME} completion zsh > ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
.include <bsd.port.mk>