1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/net-mgmt/kapacitor/Makefile
2021-04-06 16:31:07 +02:00

60 lines
1.5 KiB
Makefile

# Created by: Stefan Lambrev <cheffo@freebsd-bg.org>
PORTNAME= kapacitor
DISTVERSIONPREFIX= v
DISTVERSION= 1.5.1
CATEGORIES= net-mgmt
MAINTAINER= cheffo@freebsd-bg.org
COMMENT= Time-series data collection
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
USES= go
USE_RC_SUBR= kapacitord
USE_GITHUB= yes
GH_ACCOUNT= influxdata
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME}
GO_BUILDFLAGS+= -ldflags "-X main.version=${DISTVERSION}"
GO_TARGET= ./cmd/kapacitor \
./cmd/kapacitord
SUB_FILES= kapacitord
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}/
post-install:
${MKDIR} ${STAGEDIR}${KAPACITORD_DBDIR} \
${STAGEDIR}${KAPACITORD_LOGDIR}
@${SED} -i .bak -e \
"s|/var/lib/kapacitor|/var/db/kapacitor|g" \
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf
${INSTALL_DATA} \
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
.include <bsd.port.mk>