View | Details | Raw Unified | Return to bug 247083 | Differences between
and this patch

Collapse All | Expand All

(-)www/carbonapi/Makefile (-30 / +30 lines)
Lines 1-45 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=		carbonapi
3
PORTNAME=	carbonapi
4
DISTVERSION=		0.11.0
4
DISTVERSION=	0.13.0
5
CATEGORIES=		www
5
CATEGORIES=	www
6
6
7
MAINTAINER=		a.andersson.thn@gmail.com
7
MAINTAINER=	a.andersson.thn@gmail.com
8
COMMENT=		Go implementation of carbonapi
8
COMMENT=	Go implementation of carbonapi
9
9
10
LICENSE=		BSD2CLAUSE
10
LICENSE=	BSD2CLAUSE
11
LICENSE_FILE=		${WRKSRC}/LICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
12
13
USES=			gmake go
13
USES=		go:modules
14
14
15
USE_GITHUB=		yes
15
USE_GITHUB=	yes
16
GH_ACCOUNT=		go-graphite
16
GH_ACCOUNT=	go-graphite
17
GH_SUBDIR=		src/github.com/${GH_ACCOUNT}/${PORTNAME}
18
USE_RC_SUBR=		${PORTNAME}
19
17
20
USERS=			carbon
18
USE_RC_SUBR=	${PORTNAME}
21
GROUPS=			carbon
22
19
23
OPTIONS_DEFINE=		CAIRO
20
USERS=		carbon
21
GROUPS=		carbon
24
22
25
CAIRO_USES=		pkgconfig
23
OPTIONS_DEFINE=	CAIRO EXAMPLES
26
CAIRO_VARS=		CARBON_API_ARGS=${PORTNAME}
24
27
CAIRO_VARS_OFF=		CARBON_API_ARGS=nocairo
25
CAIRO_USES=	pkgconfig
26
CAIRO_VARS=	CARBON_ARGS="-tags cairo"
28
CAIRO_LIB_DEPENDS=	libcairo.so:graphics/cairo
27
CAIRO_LIB_DEPENDS=	libcairo.so:graphics/cairo
29
28
30
do-build:
29
GO_TARGET=	./cmd/carbonapi \
31
	@cd ${WRKSRC}/${GH_SUBDIR} && \
30
		./cmd/carbonzipper
32
		${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} VERSION=${DISTVERSION} \
33
		${MAKE_CMD} ${CARBON_API_ARGS}
34
31
35
do-install:
32
GO_BUILDFLAGS=	-v \
36
	@${MKDIR} ${STAGEDIR}/${PREFIX}/etc/carbonapi
33
		${CARBON_ARGS} \
34
		-ldflags="-X main.BuildVersion=${DISTVERSION}"
35
36
post-install:
37
	@${MKDIR} ${STAGEDIR}/var/log/carbonapi
37
	@${MKDIR} ${STAGEDIR}/var/log/carbonapi
38
	${INSTALL_PROGRAM} ${WRKSRC}/carbonapi ${STAGEDIR}${PREFIX}/bin
39
	${INSTALL_DATA} ${WRKSRC}/carbonapi.example.toml ${STAGEDIR}${PREFIX}/etc/carbonapi
40
	${INSTALL_DATA} ${WRKSRC}/carbonapi.example.yaml ${STAGEDIR}${PREFIX}/etc/carbonapi
41
	${INSTALL_DATA} ${WRKSRC}/graphiteWeb.example.yaml ${STAGEDIR}${PREFIX}/etc/carbonapi
42
	${INSTALL_DATA} ${WRKSRC}/graphTemplates.example.toml ${STAGEDIR}${PREFIX}/etc/carbonapi
43
	${INSTALL_DATA} ${WRKSRC}/graphTemplates.example.yaml ${STAGEDIR}${PREFIX}/etc/carbonapi
44
38
39
post-install-EXAMPLES-on:
40
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
41
	${INSTALL_DATA} ${WRKSRC}/cmd/carbonapi/*.toml ${STAGEDIR}${EXAMPLESDIR}
42
	${INSTALL_DATA} ${WRKSRC}/cmd/carbonapi/*.yaml ${STAGEDIR}${EXAMPLESDIR}
43
	${INSTALL_DATA} ${WRKSRC}/cmd/carbonzipper/example.conf ${STAGEDIR}${PREFIX}${EXAMPLESDIR}/carbonzipper.example.conf
44
45
.include <bsd.port.mk>
45
.include <bsd.port.mk>
(-)www/carbonapi/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1522042565
1
TIMESTAMP = 1591623663
2
SHA256 (go-graphite-carbonapi-0.11.0_GH0.tar.gz) = d54228f0fce17db1ed319bc7a65c4296b539e6fec34645bfcaed4baf39840efc
2
SHA256 (go-graphite-carbonapi-0.13.0_GH0.tar.gz) = ce65ee520ef44f18c37b05de23544e80dcb5b49d89d74987356378ee2252f189
3
SIZE (go-graphite-carbonapi-0.11.0_GH0.tar.gz) = 1898657
3
SIZE (go-graphite-carbonapi-0.13.0_GH0.tar.gz) = 3464354
(-)www/carbonapi/files/patch-carbonapi.example.toml (-19 lines)
Lines 1-19 Link Here
1
--- carbonapi.example.toml.orig	2018-03-20 21:03:28 UTC
2
+++ carbonapi.example.toml
3
@@ -11,7 +11,7 @@ maxBatchSize = 100
4
 pidFile = ""
5
 sendGlobsAsIs = false
6
 tz = ""
7
-graphTemplates = "graphTemplates.example.toml"
8
+graphTemplates = "/usr/local/etc/carbonapi/graphTemplates.example.toml"
9
 
10
 [cache]
11
 defaultTimeoutSec = 60
12
@@ -35,7 +35,7 @@ logger = ""
13
 
14
 [[logger]]
15
 encoding = "json"
16
-file = "carbonapi.log"
17
+file = "/var/log/carbonapi/carbonapi.log"
18
 level = "info"
19
 logger = ""
(-)www/carbonapi/files/patch-carbonapi.example.yaml (-19 lines)
Lines 1-19 Link Here
1
--- carbonapi.example.yaml.orig	2018-03-20 21:04:44 UTC
2
+++ carbonapi.example.yaml
3
@@ -106,7 +106,7 @@ upstreams:
4
 # If not zero, enabled cache for find requests
5
 # This parameter controls when it will expire (in seconds)
6
 # Default: 600 (10 minutes)
7
-graphTemplates: graphTemplates.example.yaml
8
+graphTemplates: /usr/local/etc/carbonapi/graphTemplates.example.yaml
9
 expireDelaySec: 10
10
 # Uncomment this to get the behavior of graphite-web as proposed in https://github.com/graphite-project/graphite-web/pull/2239
11
 # Beware this will make darkbackground graphs less readable
12
@@ -125,6 +125,6 @@ logger:
13
       encodingTime: "iso8601"
14
       encodingDuration: "seconds"
15
     - logger: ""
16
-      file: "carbonapi.log"
17
+      file: "/var/log/carbonapi/carbonapi.log"
18
       level: "info"
19
       encoding: "json"
(-)www/carbonapi/pkg-plist (-5 / +9 lines)
Lines 1-7 Link Here
1
bin/carbonapi
1
bin/carbonapi
2
%%ETCDIR%%/carbonapi.example.toml
2
bin/carbonzipper
3
%%ETCDIR%%/carbonapi.example.yaml
3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/carbonapi.example.clickhouse.yaml
4
%%ETCDIR%%/graphTemplates.example.toml
4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/carbonapi.example.prometheus.yaml
5
%%ETCDIR%%/graphTemplates.example.yaml
5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/carbonapi.example.toml
6
%%ETCDIR%%/graphiteWeb.example.yaml
6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/carbonapi.example.yaml
7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/graphTemplates.example.toml
8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/graphTemplates.example.yaml
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/graphiteWeb.example.yaml
10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/carbonzipper.example.conf
7
@dir(carbon,carbon,0750) /var/log/carbonapi
11
@dir(carbon,carbon,0750) /var/log/carbonapi

Return to bug 247083