~dricottone/huttese-apk

ref: b8cef0b1cd913719b839394fdd381b0cfe27b83f huttese-apk/sr.ht/prometheus-node-exporter/APKBUILD -rw-r--r-- 1.3 KiB
b8cef0b1 — Drew DeVault prometheus-node-exporter: update init.d/conf.d 4 years ago
                                                                                
c8dc5dbd Drew DeVault
a51ca3e1 Drew DeVault
8925761e 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
a51ca3e1 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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus-node-exporter
pkgver=0.18.1
pkgrel=1
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
b3034209d6f6f01317a76005de4110407f0ca55c08fd1a6261162485b344289e347d5c3bebece2f571d97fb1c757f897560344c98d7d651675d5ca466d26e3ef  prometheus-node-exporter.initd"