2016-06-08 23:10:40 +02:00
|
|
|
# Created by: Stefan Lambrev <cheffo@freebsd-bg.org>
|
|
|
|
|
|
|
|
PORTNAME= kapacitor
|
|
|
|
DISTVERSIONPREFIX= v
|
2018-09-18 20:00:14 +02:00
|
|
|
DISTVERSION= 1.5.1
|
2016-06-08 23:10:40 +02:00
|
|
|
CATEGORIES= net-mgmt
|
|
|
|
|
|
|
|
MAINTAINER= cheffo@freebsd-bg.org
|
|
|
|
COMMENT= Time-series data collection
|
|
|
|
|
|
|
|
LICENSE= MIT
|
2018-09-18 20:00:14 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
2016-06-08 23:10:40 +02:00
|
|
|
|
2017-10-10 23:31:30 +02:00
|
|
|
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
|
2016-06-08 23:10:40 +02:00
|
|
|
|
2019-06-29 05:51:13 +02:00
|
|
|
USES= go
|
2017-11-28 22:21:04 +01:00
|
|
|
|
2016-06-08 23:10:40 +02:00
|
|
|
USE_RC_SUBR= kapacitord
|
|
|
|
|
|
|
|
USE_GITHUB= yes
|
|
|
|
|
2018-09-18 20:00:14 +02:00
|
|
|
GH_ACCOUNT= influxdata
|
|
|
|
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME}
|
2016-06-08 23:10:40 +02:00
|
|
|
|
2019-09-30 00:31:57 +02:00
|
|
|
GO_BUILDFLAGS+= -ldflags "-X main.version=${DISTVERSION}"
|
|
|
|
GO_TARGET= ./cmd/kapacitor \
|
|
|
|
./cmd/kapacitord
|
|
|
|
|
2016-06-08 23:10:40 +02:00
|
|
|
SUB_FILES= kapacitord
|
2018-03-10 11:41:37 +01:00
|
|
|
SUB_LIST+= KAPACITORD_USER=${KAPACITORD_USER} \
|
|
|
|
KAPACITORD_GROUP=${KAPACITORD_GROUP} \
|
|
|
|
KAPACITORD_DBDIR=${KAPACITORD_DBDIR} \
|
|
|
|
KAPACITORD_LOGDIR=${KAPACITORD_LOGDIR}
|
|
|
|
PLIST_SUB= KAPACITORD_USER=${KAPACITORD_USER} \
|
|
|
|
KAPACITORD_GROUP=${KAPACITORD_GROUP} \
|
|
|
|
KAPACITORD_DBDIR=${KAPACITORD_DBDIR} \
|
|
|
|
KAPACITORD_LOGDIR=${KAPACITORD_LOGDIR}
|
|
|
|
|
|
|
|
#Use influxd user as it's aleary present in ports system
|
|
|
|
KAPACITORD_USER= influxd
|
|
|
|
KAPACITORD_GROUP= influxd
|
|
|
|
|
|
|
|
USERS= ${KAPACITORD_USER}
|
|
|
|
GROUPS= ${KAPACITORD_GROUP}
|
|
|
|
|
|
|
|
KAPACITORD_DBDIR= /var/db/${PORTNAME}/
|
|
|
|
KAPACITORD_LOGDIR= /var/log/${PORTNAME}/
|
2016-06-08 23:10:40 +02:00
|
|
|
|
2019-09-30 00:31:57 +02:00
|
|
|
post-install:
|
2018-03-10 11:41:37 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${KAPACITORD_DBDIR} \
|
|
|
|
${STAGEDIR}${KAPACITORD_LOGDIR}
|
|
|
|
@${SED} -i .bak -e \
|
|
|
|
"s|/var/lib/kapacitor|/var/db/kapacitor|g" \
|
2019-09-30 00:31:57 +02:00
|
|
|
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf
|
2016-06-08 23:10:40 +02:00
|
|
|
${INSTALL_DATA} \
|
2019-09-30 00:31:57 +02:00
|
|
|
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf \
|
2016-06-08 23:10:40 +02:00
|
|
|
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
|
|
|
|
2020-03-31 18:15:16 +02:00
|
|
|
.include <bsd.port.mk>
|