View | Details | Raw Unified | Return to bug 251256
Collapse All | Expand All

(-)net/concourse-fly/Makefile (-17 / +4 lines)
Lines 11-21 Link Here
11
11
12
LICENSE=	APACHE20
12
LICENSE=	APACHE20
13
13
14
GO_PKGNAME=	github.com/concourse/fly
14
USES=		go:modules tar:xz
15
GO_BUILDFLAGS+=	-mod=vendor \
16
		-ldflags="-X github.com/concourse/concourse.Version=${PORTVERSION}"
17
15
18
USES=		go tar:xz
16
GO_TARGET=	./cmd/concourse:fly
17
GO_BUILDFLAGS=	-ldflags="-s -w -X github.com/concourse/concourse.Version=${PORTVERSION}"
18
CGO_CFLAGS=	-I.
19
19
20
CONFLICTS_INSTALL=	fly
20
CONFLICTS_INSTALL=	fly
21
21
Lines 42-64 Link Here
42
#
42
#
43
#     make create-src-archive
43
#     make create-src-archive
44
#
44
#
45
# Because it doesn't match the project layout USES=go expects, we
46
# override the post-extract and do-build targets to adapt the commands.
47
#
48
# In particular, we must pass `-mod=vendor` to go-install to be able to
49
# use the third-party dependencies fetched with `go mod vendor`.
50
51
# `fly` version is set by default to "0.0.0-dev" in version/Version.go.
45
# `fly` version is set by default to "0.0.0-dev" in version/Version.go.
52
# Instead of patching the file, we use a linker flag to set the variable
46
# Instead of patching the file, we use a linker flag to set the variable
53
# to the port's version.
47
# to the port's version.
54
48
55
post-extract:
56
	@:
57
58
do-build:
59
	(cd ${WRKSRC}/fly; \
60
		${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} 'install' ${GO_BUILDFLAGS})
61
62
.PHONY: create-src-archive
49
.PHONY: create-src-archive
63
ARCHIVE_DIR=	${DISTDIR}/concourse-${PORTVERSION}
50
ARCHIVE_DIR=	${DISTDIR}/concourse-${PORTVERSION}
64
create-src-archive:
51
create-src-archive:

Return to bug 251256