aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/kubectl/Makefile
blob: 0673f5e3bdf3807bea0e3920666216a0c22865fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Created by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
# $FreeBSD$

PORTNAME=   kubectl
PORTVERSION=    1.16.0
DISTVERSIONPREFIX=  v
CATEGORIES= sysutils

MAINTAINER= danilo@FreeBSD.org
COMMENT=    Kubernetes command-line tool

LICENSE=    APACHE20

USES=       go:modules

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/kubectl/pkg/version.gitMajor=${PORTVERSION:R:R} \
        -X k8s.io/kubectl/pkg/version.gitMinor=${PORTVERSION:R:E} \
        -X k8s.io/kubectl/pkg/version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ') \
        -X k8s.io/kubectl/pkg/version.gitCommit="" \
        -X k8s.io/kubectl/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION} \
        -X k8s.io/client-go/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION}"

PLIST_FILES=    bin/${PORTNAME}

.include <bsd.port.mk>