~dricottone/huttese-apk

ref: f7d0500bc211727edfcca969a97181c6956933c1 huttese-apk/sr.ht/prometheus-node-exporter/APKBUILD -rw-r--r-- 1.5 KiB
f7d0500b — Drew DeVault py3-pgpy: bump pkgrel 4 years ago
                                                                                
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=1.0.0
pkgrel=0
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="618208cc4cac62ef2699b75ea4fef5165c8537322177271cab42237547e077ea05715e203f561cf080cf3dc5383d77b4b1a3802030bd7fa6d04e599b3d4a06ce  prometheus-node-exporter-1.0.0.tar.gz
fe8320b47d93c9590ccf9a3456f74b90a960fd46a7561202470687de2fc5d2caebded682d2274bec71602e694b778f282d5876400da60d716ce3d3cee5e45b99  prometheus-node-exporter.initd
a19cb380e12a292af3645de18d59ebac6ce4b521281f1761d069b5d8bd574a83c92265a3a4023e372fce7ec9bab0f1849e9953cf81801fc24576acec20afb964  prometheus-node-exporter.confd"