42 lines
1.4 KiB
Bash
42 lines
1.4 KiB
Bash
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
pkgname=prometheus-smbmc-exporter
|
|
_pkgname=smbmc-exporter
|
|
pkgver=0.1.0
|
|
pkgrel=4
|
|
pkgdesc="Prometheus exporter for smbmc metrics"
|
|
arch=('any')
|
|
url="https://github.com/grawlinson/smbmc-exporter"
|
|
license=('GPL')
|
|
depends=('python-smbmc' 'python-click' 'python-prometheus_client')
|
|
makedepends=('python-pip' 'python-poetry')
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
|
'systemd.service'
|
|
'sysusers.conf')
|
|
b2sums=('ae5c63b4e7b19746dfb250c9db1a942133ebb826b315e194d396c4aea478bf5e7587b31568542776f9c79eca0a08503f7506136188bf087c5ac112d1f9f6551c'
|
|
'a78a964ecef23f2eed36c1c926692848d6b03232ba947dd8234cf43cf7a7151f933749913037964764fa9fcf0a89f3344e67a5fada83f4a90aea241e8c4cb06a'
|
|
'6b1b7367ab783700cfff7eadfeff18220a7cc9e63fa923b4af2fd4da85b0b94b2c6462819f2906d8b1f42eb7e2fb2228b1297537e3585bcb47cc498ca314e716')
|
|
|
|
build() {
|
|
cd "$_pkgname-$pkgver"
|
|
poetry build --format wheel
|
|
}
|
|
|
|
package() {
|
|
# systemd integration
|
|
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
|
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
|
|
|
cd "$_pkgname-$pkgver"
|
|
|
|
# package
|
|
PIP_CONFIG_FILE=/dev/null pip install \
|
|
--isolated \
|
|
--root="$pkgdir" \
|
|
--ignore-installed \
|
|
--no-deps \
|
|
dist/*.whl
|
|
|
|
# license
|
|
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
|
}
|