aboutsummaryrefslogtreecommitdiff
path: root/sysutils/oc/Makefile
blob: b666a66fa7f30981ee5500ed75738eda2305fc45 (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
32
33
34
35
36
37
38
39
40
41
42
43
PORTNAME=	oc
PORTVERSION=	4.9
DISTVERSIONPREFIX=	release-
PORTREVISION=	19
CATEGORIES=	sysutils

MAINTAINER=	jhixson@freebsd.org
COMMENT=	OpenShift Command Line
WWW=		https://github.com/openshift/oc

LICENSE=	APACHE20
LICENSE_FILE=	${GO_WRKSRC}/LICENSE

USES=		go:modules

LIB_DEPENDS=	libassuan.so:security/libassuan \
		libgpg-error.so:security/libgpg-error \
		libgpgme.so:security/gpgme

PLIST_FILES=	bin/oc

USE_GITHUB=	yes
GH_ACCOUNT=	jhixson74
GH_SUBDIR=	src/github.com/openshift/oc

GIT_COMMIT=	ddd7170fca667fef6397f5f27f7a5a41d7769b75

GH_TUPLE=	golang:sys:v0.6.0:sys

GO_BUILDFLAGS=	-ldflags="${STRIP} -w \
				-X github.com/openshift/oc/pkg/version.commitFromGit=${DISTVERSIONPREFIX}${PORTVERSION} \
				-X github.com/openshift/oc/pkg/version.versionFromGit=${PORTVERSION} \
				-X github.com/openshift/oc/pkg/version.majorFromGit=${PORTVERSION:S/\.[0-9]+$//} \
				-X github.com/openshift/oc/pkg/version.miniorFromGit=${PORTVERSION:S/^[0-9]+\.//} \
				-X github.com/openshift/oc/pkg/version.gitTreeState=dirty"

GO_TARGET=	./cmd/${PORTNAME}

post-extract:
	${RM} -r ${WRKSRC}/vendor/golang.org/x/sys
	${LN} -s ${WRKDIR}/sys-* ${WRKSRC}/vendor/golang.org/x/sys

.include <bsd.port.mk>