aboutsummaryrefslogtreecommitdiffstats
path: root/net/cf/Makefile
blob: 100a492c1ff5b950d6c5e95835120119480e21cb (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
# $FreeBSD$

PORTNAME=   cf
PORTVERSION=    6.38.0
DISTVERSIONPREFIX=  v
CATEGORIES= net

MAINTAINER= dumbbell@FreeBSD.org
COMMENT=    CLI for Cloud Foundry written in Go

LICENSE=    APACHE20
LICENSE_FILE=   ${WRKSRC}/LICENSE

BUILD_DEPENDS=  ${LOCALBASE}/bin/go-bindata:devel/go-bindata

USE_GITHUB= yes
GH_ACCOUNT= cloudfoundry
GH_PROJECT= cli

USES=       go
GO_PKGNAME= code.cloudfoundry.org/cli

PLIST_FILES=    bin/cf

PORTDOCS=   NOTICE README.md

OPTIONS_DEFINE= DOCS

do-build:
    (cd ${WRKDIR}; \
    ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} \
        install -v -ldflags="-X code.cloudfoundry.org/cli/version.binaryVersion=${PORTVERSION}" ${GO_TARGET})

do-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for x in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${x} ${STAGEDIR}${DOCSDIR}
.endfor

post-install:
    ${MV} ${STAGEDIR}${PREFIX}/bin/cli ${STAGEDIR}${PREFIX}/bin/cf

.include <bsd.port.mk>