summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8bd2ceeec696490bb974fe0e33a9bf392a3b3fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Matthew McGinn <mamcgi@gmail.com>
# Maintainer: Adam S Levy <adam@aslevy.com>
# Contributor: Chris Clonch <chris at theclonchs dot com>
# Contributor: Justin Dray <justin@dray.be>
pkgname=chronograf
pkgver=1.10.0
pkgrel=1
pkgdesc='Time-series data visualization tool for InfluxDB'
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url='https://www.influxdata.com/time-series-platform/chronograf/'
_github_url="https://github.com/influxdata/chronograf"
license=('AGPL')
makedepends=('go' 'git' 'make' 'npm' 'yarn' 'nodejs' 'python2' 'go-bindata')
depends=('glibc')
backup=('etc/chronograf/chronograf.conf')
install="chronograf.install"
source=("git+https://github.com/influxdata/chronograf#tag=${pkgver}"
	'chronograf.sysusers'
	'chronograf.tmpfiles'
)
sha256sums=('SKIP'
            '594777c81e3728fe1d5033c61034fb58d26a7c79f00f2a6daa143de521cf5440'
            'c81f81247b99928bd20428f7188c1790fff89c4521f3322a8ff148272b24bab6')

build() {
	export GOPATH="${srcdir}"
	export GOBIN="${GOPATH}/bin"
	export PATH="${GOBIN}:${PATH}"
	mkdir -p "${GOPATH}/src/github.com/influxdata"
	cp -af "${srcdir}/chronograf" "${GOPATH}/src/github.com/influxdata/"

	cd "${GOPATH}/src/github.com/influxdata/chronograf"

	make
	go install github.com/influxdata/${pkgname}/cmd/${pkgname}
	go install github.com/influxdata/${pkgname}/cmd/chronoctl
}

package() {
	export GOPATH="${srcdir}"
	export GOBIN="${GOPATH}/bin"

	cd "${srcdir}"
	install -Dm644 chronograf.sysusers "${pkgdir}/usr/lib/sysusers.d/chronograf.conf"
	install -Dm644 chronograf.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/chronograf.conf"

	cd "${GOBIN}"
	install -Dsm755 chronograf "${pkgdir}/usr/bin/chronograf"
	install -Dsm755 chronoctl "${pkgdir}/usr/bin/chronoctl"

	cd "${GOPATH}/src/github.com/influxdata/chronograf"
	install -Dm644 etc/scripts/chronograf.service \
		"${pkgdir}/usr/lib/systemd/system/chronograf.service"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/chronograf/LICENSE"
	install -dm755 "${pkgdir}/usr/share/chronograf/canned/"
	install -Dm644 canned/*.json "${pkgdir}/usr/share/chronograf/canned/"
}