aports/community/bird_exporter/APKBUILD

41 lines
1.5 KiB
Text

# Contributor: Mike Crute <mike@crute.us>
# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
pkgname=bird_exporter
pkgver=1.4.3
pkgrel=11
pkgdesc="Metric exporter for bird routing daemon to use with Prometheus"
url="https://github.com/czerwonk/bird_exporter"
arch="all"
license="MIT"
pkgusers="$pkgname"
depends="bird"
makedepends="go ronn"
source="https://github.com/czerwonk/bird_exporter/archive/$pkgver/bird_exporter-$pkgver.tar.gz
bird_exporter.initd
bird_exporter.confd
"
options="!check net" # no checks available
install="bird_exporter.pre-install"
subpackages="$pkgname-openrc $pkgname-doc"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build
ronn -r bird_exporter.1.md
}
package() {
install -Dm755 bird_exporter "$pkgdir"/usr/bin/bird_exporter
install -Dm755 "$srcdir"/bird_exporter.initd "$pkgdir"/etc/init.d/bird_exporter
install -Dm644 "$srcdir"/bird_exporter.confd "$pkgdir"/etc/conf.d/bird_exporter
install -Dm644 bird_exporter.1 "$pkgdir"/usr/share/man/man1/bird_exporter.1
}
sha512sums="
346ba67d4b468a24fd173dc3aee4c0a24a4ff676a768711329b958024b59078b98bd8bae86d3d24434953f3bfcaeb7bd53a36a82e26826676449622b7667932a bird_exporter-1.4.3.tar.gz
a884687a0730b7d863010704a533677949614845349f8fe988fa3bfd2cde7639ff2c7a3cc1d78f5bc91b1c84b998574ba080e5920e57e5d0f760019815e74c8e bird_exporter.initd
fd593a5fd9c49a7576ea445f07003e42567fa4b83ec3cb520222572a88f40f779374cf6471317b4b579b0e1f4a26f221dfdbc63f0ab5d514a2acff9583236218 bird_exporter.confd
"