mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/prometheus-wireguard-exporter: new aport
This commit is contained in:
parent
e464383d44
commit
e43c2c7582
38
testing/prometheus-wireguard-exporter/APKBUILD
Normal file
38
testing/prometheus-wireguard-exporter/APKBUILD
Normal file
@ -0,0 +1,38 @@
|
||||
# Maintainer: Michael Aldridge <aldridge.mac@gmail.com>
|
||||
pkgname=prometheus-wireguard-exporter
|
||||
pkgver=3.2.1
|
||||
pkgrel=0
|
||||
pkgdesc="A Prometheus exporter for WireGuard, written in Rust"
|
||||
url="https://github.com/MindFlavor/prometheus_wireguard_exporter"
|
||||
arch="all !s390x !ppc64le" #Crypto is broken (https://github.com/briansmith/ring/issues/389)
|
||||
license="MIT"
|
||||
makedepends="cargo"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/MindFlavor/prometheus_wireguard_exporter/archive/$pkgver.tar.gz
|
||||
prometheus-wireguard-exporter.initd
|
||||
prometheus-wireguard-exporter.confd"
|
||||
|
||||
builddir="$srcdir"/prometheus_wireguard_exporter-"$pkgver"
|
||||
|
||||
build() {
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cargo test --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cargo install --path . --root="$pkgdir"/usr
|
||||
rm -f "$pkgdir"/usr/.crates2.json
|
||||
rm -f "$pkgdir"/usr/.crates.toml
|
||||
|
||||
install -m755 -D "$srcdir"/$pkgname.initd \
|
||||
"$pkgdir"/etc/init.d/$pkgname
|
||||
|
||||
install -m755 -D "$srcdir"/$pkgname.confd \
|
||||
"$pkgdir"/etc/conf.d/$pkgname
|
||||
}
|
||||
sha512sums="45de52b3bd30719407093fe562f44302dd34184b23ce63c1855ac6df064fd73dcac982aef3dfb03aa749fe9f207fa26f262583f76741081b8600d0298cda6101 prometheus-wireguard-exporter-3.2.1.tar.gz
|
||||
f611bb81839735075f19e80155e9eb9e18da284ef2bada06eb6c5b9b06fc706a6b21d463f52027ba7dbe81b76e3f4771401265fe8a20d512082ec35358f091a3 prometheus-wireguard-exporter.initd
|
||||
876f7f5a8c5092980783aa9f60eb7b3497d93ab66c1aa6780bf4988f720187d437c8b951f938f012956ed1ac1971eab85e972521750d1a25d41fc7fcf0357188 prometheus-wireguard-exporter.confd"
|
||||
@ -0,0 +1 @@
|
||||
export INTERFACE=wg0
|
||||
@ -0,0 +1,11 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Prometheus Wireguard Exporter"
|
||||
supervisor=supervise-daemon
|
||||
command=/usr/bin/prometheus_wireguard_exporter
|
||||
command_args="-n /etc/wireguard/${INTERFACE}.conf"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user