~dricottone/huttese-apk

ref: e80e9a22950acbc69012c37f5272d2cf274fdc30 huttese-apk/sr.ht/prometheus-node-exporter/APKBUILD -rw-r--r-- 1.5 KiB
e80e9a22 — Drew DeVault hg.sr.ht-nginx: add sr.ht-nginx dependency 4 years ago
                                                                                
c8dc5dbd Drew DeVault
eeadbf27 Drew DeVault
c8dc5dbd Drew DeVault
8925761e Drew DeVault
c8dc5dbd Drew DeVault
8925761e Drew DeVault
c8dc5dbd Drew DeVault
b8cef0b1 Drew DeVault
c8dc5dbd Drew DeVault
b8cef0b1 Drew DeVault
c8dc5dbd Drew DeVault
eeadbf27 Drew DeVault
228a485d 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
38
39
40
41
42
43
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus-node-exporter
pkgver=0.18.1
pkgrel=2
pkgdesc="prometheus exporter for machine metrics"
url="https://github.com/prometheus/node_exporter"
arch="all"
license="Apache-2.0"
install="prometheus-node-exporter.pre-install"
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/node_exporter/archive/v$pkgver.tar.gz
	prometheus-node-exporter.initd
	prometheus-node-exporter.confd
"
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
    mkdir -p "$pkgdir"/etc/conf.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
	install -Dm644 "$srcdir"/prometheus-node-exporter.confd \
		"$pkgdir"/etc/conf.d/prometheus-node-exporter
}

sha512sums="cf2b854fbec1ba39b18432cdc11ab507ebc5b2828e6b34b4f49af9b949fcd365cb3e5eb1e265d0825783810c6b1572a8b3512ec27a46e5c83f89a505590159c0  prometheus-node-exporter-0.18.1.tar.gz
fe8320b47d93c9590ccf9a3456f74b90a960fd46a7561202470687de2fc5d2caebded682d2274bec71602e694b778f282d5876400da60d716ce3d3cee5e45b99  prometheus-node-exporter.initd
a19cb380e12a292af3645de18d59ebac6ce4b521281f1761d069b5d8bd574a83c92265a3a4023e372fce7ec9bab0f1849e9953cf81801fc24576acec20afb964  prometheus-node-exporter.confd"