# Contributor: Stefan Wagner # Maintainer: Stefan Wagner pkgname=influxdb pkgver=1.2.2 pkgrel=0 pkgdesc="Scalable datastore for metrics, events, and real-time analytics" url="https://www.influxdata.com/time-series-platform/influxdb/" arch="all !aarch64" license="MIT" makedepends="go glide python2 asciidoc xmlto" pkgusers="influxdb" pkggroups="influxdb" install="$pkgname.pre-install" subpackages="$pkgname-doc" source="influxdb.initd influxdb.logrotate glide.yaml glide.lock " builddir="$srcdir/src/github.com/influxdata/$pkgname" _git_repo="https://github.com/influxdata/influxdb.git" unpack() { export GOPATH="$srcdir" git clone --branch v${pkgver} $_git_repo $builddir || return 1 cd "$builddir" cp "$srcdir"/glide.yaml "$srcdir"/glide.lock . || return 1 glide install --skip-test || return 1 default_unpack || return 1 } build() { export GOPATH="$srcdir" cd "$builddir" python2 build.py --no-get || return 1 make -C man } package() { cd "$builddir" install -Dm755 "build/influxd" "$pkgdir/usr/sbin/influxd" || return 1 install -Dm755 "build/influx" "$pkgdir/usr/bin/influx" || return 1 install -Dm755 "build/influx_tsm" "$pkgdir/usr/bin/influx_tsm" || return 1 install -Dm755 "build/influx_inspect" \ "$pkgdir/usr/bin/influx_inspect" || return 1 install -d "$pkgdir/usr/share/man/man1/" || return 1 install -Dm644 man/*.1 "$pkgdir/usr/share/man/man1/" || return 1 install -Dm644 "etc/config.sample.toml" \ "$pkgdir/etc/influxdb/influxdb.conf" || return 1 install -Dm755 "$srcdir/$pkgname.initd" \ "$pkgdir/etc/init.d/$pkgname" || return 1 install -Dm644 "$srcdir/$pkgname.logrotate" \ "$pkgdir/etc/logrotate.d/$pkgname" || return 1 } glide_init() { abuild deps clean export GOPATH="$srcdir" git clone --branch v${pkgver} $_git_repo $builddir || return 1 cd "$builddir" glide init --non-interactive || return 1 glide up --skip-test || return 1 cp glide.yaml glide.lock "$startdir" cd $startdir && abuild checksum undeps } sha512sums="55d5776fde330001f254fed4b01163d576d1995c23b08ef64c3c33b7a53fa49c71092867a17149d3148af7a8e17dc4779481afe9dd54a86eeee16168dbb964e0 influxdb.initd 5d754e3aeec912bae8f5bf2f84153d4ccc82918d9c728631e8b9ad6737fab3352af0ab63f46ac80aab6384d779bae5d321da0465f26fd8798a9694f7d79f879d influxdb.logrotate f8d8d03ae059573dcc2362d800c059a83835d0145530c43e284445e8de77e4653dd6afe17de0cba2a1b3aed83f2820a2b1c588fe0791b16021cf8ccf059a79a4 glide.yaml 12887cbd7ad201401b096b912338435df6e911f331e46a87216493a64017bee7e67e9ea5a631e511407abc3e2c1010872fc610d2886171d632f7a80df4b16534 glide.lock"