# Contributor: Guy Godfroy # Maintainer: Guy Godfroy pkgname=prometheus-nextcloud-exporter _pkgname=nextcloud-exporter pkgver=0.6.1 pkgrel=2 pkgdesc="Prometheus nextcloud exporter" url="https://github.com/xperimental/nextcloud-exporter" arch="all" license="MIT" makedepends="go" install="$pkgname.pre-install" subpackages="$pkgname-openrc" source="$_pkgname-$pkgver.tar.gz::https://github.com/xperimental/nextcloud-exporter/archive/v$pkgver.tar.gz nextcloud-exporter.initd nextcloud-exporter.confd " builddir="$srcdir/$_pkgname-$pkgver" build() { GOLDFLAGS="-X main.Version=$pkgver" go build \ -tags netgo \ -ldflags "$GOLDFLAGS" \ -o nextcloud-exporter } check() { go test -cover ./... } package() { install -Dm755 nextcloud-exporter "$pkgdir"/usr/bin/nextcloud-exporter install -Dm755 "$srcdir"/nextcloud-exporter.initd "$pkgdir"/etc/init.d/nextcloud-exporter install -Dm644 "$srcdir"/nextcloud-exporter.confd "$pkgdir"/etc/conf.d/nextcloud-exporter } sha512sums=" 614a48fa0416e137433b64b1b79baffa651a42a1c85fd7131ff86d7cca467ed6cfe9ea0cbbbfa47d39083d7c34a19d38c0696a0d5f2c1c87252bbef6dd0960ba nextcloud-exporter-0.6.1.tar.gz 4271cac29895943c2d6b7a8bf5a1d35799c1af2a558b7599ffafe037e3de5186773485eb398623e50a4926a431c6cd4942049e16d970e5cf922258c0ffede180 nextcloud-exporter.initd c3bbcaf220838f405fae2c23f67902d9efe247713b96b024f713b843c015dcb8fa7a3427f681dc9f682a7dae42dfec461ed329a9cfcaa1bce95eecee28ce8d59 nextcloud-exporter.confd "