aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prometheus-node-exporter/APKBUILD
diff options
context:
space:
mode:
authorTiago Ilieve <tiago.myhro@gmail.com>2019-01-25 14:56:07 +0100
committerAndy Postnikov <apostnikov@gmail.com>2019-01-27 04:42:12 +0200
commitcbeabb778913c4f610bf6d7acae21464e3225414 (patch)
treebe7dcc35cc6ab97d10ed3cabab4d478a7e5ace5c /testing/prometheus-node-exporter/APKBUILD
parentf2d584a17a087944ceb8f78a0c5e027d9e18f4ce (diff)
downloadaports-cbeabb778913c4f610bf6d7acae21464e3225414.tar.gz
aports-cbeabb778913c4f610bf6d7acae21464e3225414.tar.bz2
aports-cbeabb778913c4f610bf6d7acae21464e3225414.tar.xz
testing/prometheus-node-exporter: new aport
Diffstat (limited to 'testing/prometheus-node-exporter/APKBUILD')
-rw-r--r--testing/prometheus-node-exporter/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/testing/prometheus-node-exporter/APKBUILD b/testing/prometheus-node-exporter/APKBUILD
new file mode 100644
index 0000000000..5db3e3ad7f
--- /dev/null
+++ b/testing/prometheus-node-exporter/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Tiago Ilieve <tiago.myhro@gmail.com>
+# Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
+pkgname=prometheus-node-exporter
+_pkgname=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>=1.11 bash sed"
+install="$pkgname.pre-install $pkgname.pre-upgrade"
+subpackages="$pkgname-openrc"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/prometheus/node_exporter/archive/v$pkgver.tar.gz
+ disable-go-race-detector.patch
+ fix-go-sum.patch
+ node-exporter.confd
+ node-exporter.initd"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ go build -v -ldflags "-s -w -X github.com/prometheus/common/version.Version=$pkgver" -o node_exporter
+}
+
+check() {
+ cd "$builddir"
+
+ make test
+ ./node_exporter --version
+}
+
+package() {
+ cd "$builddir"
+
+ install -Dm755 "$srcdir/node-exporter.confd" "$pkgdir"/etc/conf.d/node-exporter
+ install -Dm755 "$srcdir/node-exporter.initd" "$pkgdir"/etc/init.d/node-exporter
+ install -Dm755 ./node_exporter "$pkgdir"/usr/bin/node_exporter
+}
+
+sha512sums="8650fa24014f317b23cdbe2a6f12da0912ffc74cab815d1c94fdc0a3dc01ac1dff42a454af2ebbd4d402b7834d227bcf91ebdefa630ebe997cfd478e05ee01e5 node_exporter-0.17.0.tar.gz
+82511dfe2d4d12a10d6c367225066e23a52d6389d977ecad6ceb26567f67a69b427b52e58c403d89e6f8f2ebb88879002b2ef7280f675e188a64421947b21ea0 disable-go-race-detector.patch
+2bafe0433583f14d5e99502e11ac9a9ee75c99f8f466480e569b7ef15a95529f799a3c87348020df07ff8103a4bcc42d6f4274c842d44b97620d6d6337c2b541 fix-go-sum.patch
+592d3f17a3cf487d97a14c803dded07d2dfb112b159ab1a3575310fc0176fc3255ddad6657f16a8d6d3c161bfb03c203a6271ec6e6395b75716a14b0de8baced node-exporter.confd
+df006b184c3b2d5e773044838db7143dc3a64e621f4da6b106f41915a07d5cef32933ab9bb44464f10c132f86997ae7753ae19627afd4ba6cfb125161786dfe0 node-exporter.initd"