chronograf: template cleanup

This commit is contained in:
Michael Aldridge 2017-11-26 17:31:20 -08:00
parent 769fad6806
commit 69731995b7
2 changed files with 16 additions and 53 deletions

View File

@ -1,29 +0,0 @@
--- 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}

View File

@ -1,45 +1,37 @@
# Template file for 'chronograf'
pkgname=chronograf
version=1.3.10.0
revision=1
_commit=2eca970
build_style="go"
nocross=1
revision=2
build_style=go
go_import_path="github.com/influxdata/${pkgname}"
build_wrksrc="go/src/${go_import_path}"
hostmakedepends="git nodejs yarn"
go_package="${go_import_path}/cmd/chronograf"
go_ldflags="-X main.version=${version}"
hostmakedepends="dep go-bindata nodejs-lts yarn python"
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="Michael Aldridge <maldridge@VoidLinux.eu>"
license="MIT"
license="AGPL-3.0"
homepage="https://www.influxdata.com/time-series-platform/chronograf/"
distfiles="https://github.com/influxdata/${pkgname}/archive/${version}.tar.gz"
checksum=73a82a1a9ae4c3f734f0469f2ccab1066fef526c5574c0d38d67c2afa7889811
# missing python dep and errors linking v8
broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/6213/steps/shell_3/logs/stdio"
pre_build() {
cd $GOSRCPATH
dep ensure
do_extract() {
mkdir -p ${wrksrc}/${build_wrksrc}
tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.tar.gz --strip-components=1 -C ${wrksrc}/${build_wrksrc}
}
cd $wrksrc/ui
yarn install
export PATH=$PATH:${wrksrc}/ui/node_modules/.bin
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
cd $wrksrc
make assets
}
post_install() {
vlicense LICENSE
vsv chronograf
vmkdir /usr/share/chronograf/
vcopy ${wrksrc}/${build_wrksrc}/canned /usr/share/chronograf/canned
vmkdir usr/share/chronograf/
vcopy ${wrksrc}/${build_wrksrc}/canned usr/share/chronograf/canned
}