From 4f3881c282e77d107d6fe31137bb3ac42b313e34 Mon Sep 17 00:00:00 2001 From: Nicklaus McClendon Date: Wed, 30 Aug 2017 15:55:39 -0500 Subject: [PATCH] New package: chronograf-1.3.7.0 --- srcpkgs/chronograf/files/chronograf/run | 3 ++ srcpkgs/chronograf/patches/Makefile.patch | 29 ++++++++++++++++ srcpkgs/chronograf/template | 42 +++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 srcpkgs/chronograf/files/chronograf/run create mode 100644 srcpkgs/chronograf/patches/Makefile.patch create mode 100644 srcpkgs/chronograf/template diff --git a/srcpkgs/chronograf/files/chronograf/run b/srcpkgs/chronograf/files/chronograf/run new file mode 100644 index 00000000000..3f3bb679fd8 --- /dev/null +++ b/srcpkgs/chronograf/files/chronograf/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec chpst -u _chronograf:_chronograf chronograf --bolt-path=/var/lib/chronograf/chronograf-v1.db --canned-path=/usr/share/chronograf/canned diff --git a/srcpkgs/chronograf/patches/Makefile.patch b/srcpkgs/chronograf/patches/Makefile.patch new file mode 100644 index 00000000000..7d671ae23da --- /dev/null +++ b/srcpkgs/chronograf/patches/Makefile.patch @@ -0,0 +1,29 @@ +--- go/src/github.com/influxdata/chronograf/Makefile.orig 2017-07-04 19:52:11.603513489 -0500 ++++ go/src/github.com/influxdata/chronograf/Makefile 2017-07-04 19:53:43.031014354 -0500 +@@ -8,7 +8,7 @@ + SOURCES := $(shell find . -name '*.go' ! -name '*_gen.go' -not -path "./vendor/*" ) + UISOURCES := $(shell find ui -type f -not \( -path ui/build/\* -o -path ui/node_modules/\* -prune \) ) + +-LDFLAGS=-ldflags "-s -X main.version=${VERSION} -X main.commit=${COMMIT}" ++GOLDFLAGS=-ldflags "-s -X main.version=${VERSION} -X main.commit=${COMMIT}" + BINARY=chronograf + + .DEFAULT_GOAL := all +@@ -20,7 +20,7 @@ + dev: dep dev-assets ${BINARY} + + ${BINARY}: $(SOURCES) .bindata .jsdep .godep +- go build -o ${BINARY} ${LDFLAGS} ./cmd/chronograf/main.go ++ go build -o ${BINARY} ${GOLDFLAGS} ./cmd/chronograf/main.go + + define CHRONOGIRAFFE + ._ o o +@@ -37,7 +37,7 @@ + @echo "$$CHRONOGIRAFFE" + + docker-${BINARY}: $(SOURCES) +- CGO_ENABLED=0 GOOS=linux go build -installsuffix cgo -o ${BINARY} ${LDFLAGS} \ ++ CGO_ENABLED=0 GOOS=linux go build -installsuffix cgo -o ${BINARY} ${GOLDFLAGS} \ + ./cmd/chronograf/main.go + + docker: dep assets docker-${BINARY} diff --git a/srcpkgs/chronograf/template b/srcpkgs/chronograf/template new file mode 100644 index 00000000000..1c83d9b557f --- /dev/null +++ b/srcpkgs/chronograf/template @@ -0,0 +1,42 @@ +# Template file for 'chronograf' +pkgname=chronograf +version=1.3.7.0 +revision=1 +_commit=a9358a3 +build_style="go" +nocross=1 +go_import_path="github.com/influxdata/${pkgname}" +build_wrksrc="go/src/${go_import_path}" +hostmakedepends="git nodejs yarn" +system_accounts="_chronograf" +_chronograf_homedir="/var/lib/${pkgname}" +make_dirs="${_chronograf_homedir} 0755 _chronograf _chronograf" +short_desc="Open source monitoring and visualization UI for the TICK stack" +maintainer="Nicklaus McClendon " +license="MIT" +homepage="https://www.influxdata.com/time-series-platform/chronograf/" +distfiles="https://github.com/influxdata/${pkgname}/archive/${version}.tar.gz" +checksum=a99d5dd1bf721d389975fa0bdcb3b740568195cfad5181757d5d3ace1c57cada + +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/" + export PATH=$PATH:$(go env GOPATH)/bin + make VERSION=${version} COMMIT=${_commit} + go install github.com/influxdata/chronograf/cmd/chronograf +} + +do_install() { + vbin /builddir/${pkgname}-${version}/go/bin/chronograf +} + +post_install() { + vlicense LICENSE + vsv chronograf + vmkdir /usr/share/chronograf/ + vcopy ${wrksrc}/${build_wrksrc}/canned /usr/share/chronograf/canned +}