blob: 7d0e90d556bdd3304ec3d76ff7475b0d1aee9856 (
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
|
# Created by: Jev Björsell <ports@ecadlabs.com>
PORTNAME= prometheus
PORTVERSION= 1.8.2
DISTVERSIONPREFIX= v
PORTREVISION= 4
CATEGORIES= net-mgmt
PKGNAMESUFFIX= 1
MAINTAINER= ports@ecadlabs.com
COMMENT= Systems monitoring and alerting toolkit
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cpe go
USE_GITHUB= yes
GH_TUPLE= golang:sys:fead79001313:golang_sys/vendor/golang.org/x/sys_fead79001313
GO_PKGNAME= github.com/${PORTNAME}/${PORTNAME}
USE_RC_SUBR= prometheus
USERS= prometheus
GROUPS= prometheus
BUILD_USER?= ${USER}
LD_FLAG_X_PREFIX= -X ${GO_PKGNAME}/vendor/github.com/prometheus/common/version
GO_BUILDFLAGS= -ldflags "\
-s \
${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \
${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \
${LD_FLAG_X_PREFIX}.Branch=release-${PORTVERSION:R} \
${LD_FLAG_X_PREFIX}.BuildUser=${BUILD_USER}"
GO_TARGET= ./cmd/prometheus \
./cmd/promtool
post-patch:
${RM} -r ${WRKSRC}/vendor/golang.org/x/sys
${MV} ${WRKSRC}/vendor/golang.org/x/sys_fead79001313 ${WRKSRC}/vendor/golang.org/x/sys
post-install:
${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${STAGEDIR}${LOCALBASE}/etc/prometheus.yml.sample
${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/prometheus
.include <bsd.port.mk>
|