freebsd-ports/devel/gitlab-runner/Makefile
Dmitri Goutnik 34156e93e8 Go ports: cleanup, finish transition to USES=go started with r505321 (cat. audio-mail)
- Remove custom build/install targets left in place after r505321
- Switch to the new GO_TARGET tuple syntax introduced in r512001
- Switch to go:modules when upstream already uses them

Reviewed by:	tobik
Approved by:	araujo (mentor), portmgr (adamw)
Differential Revision:	https://reviews.freebsd.org/D21741
2019-09-29 22:29:39 +00:00

69 lines
1.9 KiB
Makefile

# $FreeBSD$
PORTNAME= gitlab-runner
PORTVERSION= 12.1.0
CATEGORIES= devel
MASTER_SITES= \
https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/:dockerx64 \
https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/:dockerarm
DISTFILES= \
prebuilt-x86_64.tar.xz:dockerx64 \
prebuilt-arm.tar.xz:dockerarm
DIST_SUBDIR= gitlab-runner
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= swills@FreeBSD.org
COMMENT= Official GitLab Runner written in Go
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= go-bindata:devel/go-bindata
RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss \
bash:shells/bash \
git:devel/git
USES= go
USE_GITLAB= yes
# Find tags here:
# https://gitlab.com/gitlab-org/gitlab-runner/tags
GL_ACCOUNT= gitlab-org
GL_COMMIT= de7731dd40f8e65738ac1452c13e8636dc3453c6
GITBRANCH= 12-1-stable
# https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-freebsd-amd64
BUILT= 2019-07-19T13:53:05+0000
GO_PKGNAME= gitlab.com/${GL_ACCOUNT}/${GL_PROJECT}
GO_BUILDFLAGS= -ldflags="\
-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=${PORTVERSION} \
-X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=${GL_COMMIT:C/^(........).*/\1/} \
-X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=${BUILT} \
-X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH=${GITBRANCH} \
-s -w"
PLIST_FILES= bin/gitlab-runner
USE_RC_SUBR= gitlab_runner
USERS= gitlab-runner
GROUPS= gitlab-runner
post-patch:
@${MKDIR} ${WRKSRC}/out/docker/
@${CP} ${DISTDIR}/${DIST_SUBDIR}/prebuilt-x86_64.tar.xz ${WRKSRC}/out/docker/
@${CP} ${DISTDIR}/${DIST_SUBDIR}/prebuilt-arm.tar.xz ${WRKSRC}/out/docker/
pre-build:
@cd ${WRKSRC} && go-bindata \
-pkg docker \
-nocompress \
-nomemcopy \
-nometadata \
-prefix out/docker/ \
-o executors/docker/bindata.go \
out/docker/prebuilt-x86_64.tar.xz \
out/docker/prebuilt-arm.tar.xz
.include <bsd.port.mk>