aboutsummaryrefslogtreecommitdiff
path: root/devel/buildkite-agent/Makefile
blob: 87c836dea263b9dd7e86740d6a5b12c2b79f4823 (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
PORTNAME=	buildkite-agent
DISTVERSIONPREFIX=	v
DISTVERSION=	3.47.0
PORTREVISION=	1
CATEGORIES=	devel sysutils

MAINTAINER=	dch@FreeBSD.org
COMMENT=	Cross-platform build runner to run your own build tasks
WWW=		https://buildkite.com/

LICENSE=	APACHE20 BSD2CLAUSE BSD3CLAUSE LGPL3 MIT
LICENSE_COMB=	multi
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

RUN_DEPENDS=	bash:shells/bash

USES=		go:modules

USE_GITHUB=	yes
GH_ACCOUNT=	buildkite
GH_PROJECT=	agent
GO_MODULE=	github.com/buildkite/agent/v3

USE_RC_SUBR=	buildkite

ETCDIR=		${PREFIX}/etc/buildkite

SUB_FILES=	pkg-message

post-patch:
	@${REINPLACE_CMD} -I '' -e 's|/bin/bash|${LOCALBASE}/bin/bash|g' \
			`${FIND} ${WRKSRC}/packaging/linux -type f`
	@${REINPLACE_CMD} -I '' -e 's|/bin/bash|${LOCALBASE}/bin/bash|g' \
			`${FIND} ${WRKSRC}/bootstrap -type f -name *.go`

do-install:
	${INSTALL_PROGRAM} \
		${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
	${MKDIR} ${STAGEDIR}${ETCDIR}/hooks ${STAGEDIR}${ETCDIR}/plugins
	${INSTALL_DATA} \
		${WRKSRC}/packaging/github/linux/${PORTNAME}.cfg \
		${STAGEDIR}${ETCDIR}/${PORTNAME}.cfg.sample

post-install:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	(cd ${WRKSRC}/packaging/linux/root/usr/share/${PORTNAME} && ${COPYTREE_SHARE} hooks ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>