aboutsummaryrefslogtreecommitdiffstats
path: root/community/bird_exporter/APKBUILD
blob: fd48c5c2d76b5fe3d56b2846e6bb01b00b9a7d02 (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
# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
pkgname=bird_exporter
pkgver=1.4.3
pkgrel=2
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
	"
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 bird_exporter.1 "$pkgdir"/usr/share/man/man1/bird_exporter.1
}

sha512sums="
346ba67d4b468a24fd173dc3aee4c0a24a4ff676a768711329b958024b59078b98bd8bae86d3d24434953f3bfcaeb7bd53a36a82e26826676449622b7667932a  bird_exporter-1.4.3.tar.gz
2439669c09c7f48afa1d98653f5737bb4b0ceca90147ca8c7402bf905c4bd37c5c2e16f7816016cdfed591e6a0e55f890e001a3d2584797f7a03311bf4696782  bird_exporter.initd
"