blob: c08e4e9a14d92521405792e4ab5e13edb1619dae (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
PORTNAME= gitlab-runner
DISTVERSION= 16.7.0
PORTREVISION= 1
DISTVERSIONPREFIX= v
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
PATCH_SITES= https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/
PATCHFILES+= 4551.patch:-p1 # https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/4551, Allow FreeBSD to be used with Docker builds
MAINTAINER= mfechner@FreeBSD.org
COMMENT= Official GitLab Runner written in Go
WWW= https://gitlab.com/gitlab-org/gitlab-runner
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= go-bindata:devel/go-bindata
RUN_DEPENDS= bash:shells/bash \
ca_root_nss>=0:security/ca_root_nss \
git:devel/git
USES= go:modules
GO_MODULE= gitlab.com/gitlab-org/gitlab-runner
_BUILD_DATE= $$(date -u +%Y-%m-%dT%H:%M:%S%z)
GO_BUILDFLAGS= -ldflags=" \
-X gitlab.com/gitlab-org/gitlab-runner/commands.ROOTCONFIGDIR=${ETCDIR} \
-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=${PORTVERSION} \
-X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=${DISTVERSION} \
-X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=${_BUILD_DATE} \
-X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH=${GITBRANCH} \
-s -w"
USE_GITLAB= yes
GL_ACCOUNT= gitlab-org
GITBRANCH= 16-7-stable
# for go dependencies
# Gitlab hosts there dependencies on their own platform and not on go-proxy
# so we download the required go.mod file from gitlab
# lines are taken from go.mk
# ---------------------------
MASTER_SITES+= https://gitlab.com/gitlab-org/gitlab-runner/-/raw/v${DISTVERSION}/
DISTFILES+= go.mod
EXTRACT_ONLY+= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//:Nprebuilt*:}
# ---------------------------
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>
|