~dricottone/huttese-apk

ref: 6a7a82e663d642693ba39500d1c8f3395ea3b708 huttese-apk/prometheus/prometheus-node-exporter/APKBUILD -rw-r--r-- 1.1 KiB
6a7a82e6 — Drew DeVault libgit2 & pygit2: update 5 years ago
                                                                                
c8dc5dbd Drew DeVault
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: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus-node-exporter
pkgver=0.17.0
pkgrel=0
pkgdesc="prometheus exporter for machine metrics"
url="https://github.com/prometheus/node_exporter"
arch="all"
license="Apache-2.0"
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/node_exporter/archive/v$pkgver.tar.gz
	prometheus-node-exporter.initd
"
subpackages="$pkgname-openrc"
builddir="$srcdir/node_exporter-$pkgver"

build() {
	cd "$builddir"
	go build
}

check() {
	cd "$builddir"
	go test
}

package() {
	cd "$builddir"
    mkdir -p "$pkgdir"/usr/bin
    mkdir -p "$pkgdir"/etc/init.d
	install -Dm755 node_exporter "$pkgdir"/usr/bin/prometheus_node_exporter
	install -Dm755 "$srcdir"/prometheus-node-exporter.initd \
		"$pkgdir"/etc/init.d/prometheus-node-exporter
}

sha512sums="8650fa24014f317b23cdbe2a6f12da0912ffc74cab815d1c94fdc0a3dc01ac1dff42a454af2ebbd4d402b7834d227bcf91ebdefa630ebe997cfd478e05ee01e5  prometheus-node-exporter-0.17.0.tar.gz
ac5dd257333b9b40923d2541f68e4caac5583aee861833c8179621e290b56b686e9b58131fd7ce6ebaadb929351b65a95af7005c074fec00546813b285071abe  prometheus-node-exporter.initd"