From cfd4a1ee60a344ba63618128e87d3325a2eb4269 Mon Sep 17 00:00:00 2001 From: Nicklaus McClendon Date: Wed, 30 Aug 2017 15:57:06 -0500 Subject: [PATCH] New package: kapacitor-1.3.3 Closes: #7070 [via git-merge-pr] --- srcpkgs/kapacitor/files/kapacitor/run | 6 ++++ srcpkgs/kapacitor/template | 44 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 srcpkgs/kapacitor/files/kapacitor/run create mode 100644 srcpkgs/kapacitor/template diff --git a/srcpkgs/kapacitor/files/kapacitor/run b/srcpkgs/kapacitor/files/kapacitor/run new file mode 100644 index 00000000000..d4e85a95f18 --- /dev/null +++ b/srcpkgs/kapacitor/files/kapacitor/run @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir -p /var/log/kapacitor +chown -R _kapacitor:_kapacitor /var/log/kapacitor + +exec chpst -u _kapacitor:_kapacitor kapacitord --config /etc/kapacitor/kapacitor.conf 2>&1 diff --git a/srcpkgs/kapacitor/template b/srcpkgs/kapacitor/template new file mode 100644 index 00000000000..5366ee11a3e --- /dev/null +++ b/srcpkgs/kapacitor/template @@ -0,0 +1,44 @@ +# Template file for 'kapacitor' +pkgname=kapacitor +version=1.3.3 +revision=1 +_branch=v1.3 +_commit=ce586f3 +build_style="go" +go_import_path="github.com/influxdata/${pkgname}" +build_wrksrc="go/src/${go_import_path}" +system_accounts="_kapacitor" +_kapacitor_homedir="/var/lib/kapacitor" +make_dirs="/var/lib/kapacitor 0755 _kapacitor _kapacitor" +conf_files="/etc/${pkgname}/${pkgname}.conf" +short_desc="Open source framework for alerting on time series data" +maintainer="Nicklaus McClendon " +license="MIT" +homepage="https://www.influxdata.com/time-series-platform/kapacitor/" +distfiles="https://github.com/influxdata/${pkgname}/archive/v${version}.tar.gz" +checksum=605699bf5c7dd0bff11b4bd36f9cd481e76b2af22b18468b81c82aeab45818cf + +do_extract() { + mkdir -p ${wrksrc}/${build_wrksrc} + tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.tar.gz --strip-components=1 -C ${wrksrc}/${build_wrksrc} +} + +do_build() { + export GOPATH="/builddir/${pkgname}-${version}/go/" + go build -ldflags="-X main.version=${version} -X main.branch=${_branch} -X main.commit=${_commit}" ./cmd/kapacitor + go build -ldflags="-X main.version=${version} -X main.branch=${_branch} -X main.commit=${_commit}" ./cmd/kapacitord +} + +do_install() { + vbin kapacitor + vbin kapacitord +} + +post_install() { + vsv kapacitor + vmkdir etc/kapacitor/ + vmkdir usr/share/bash-completion/completions + vlicense LICENSE + vcopy etc/kapacitor/kapacitor.conf etc/kapacitor/kapacitor.conf + vcopy usr/share/bash-completion/completions/kapacitor usr/share/bash-completion/completions/kapacitor +}