# Contributor: Guy Godfroy # Maintainer: Guy Godfroy pkgname=prometheus-smartctl-exporter _pkgname=smartctl_exporter pkgver=0.9.1 pkgrel=1 pkgdesc="Prometheus smartctl exporter" url="https://github.com/prometheus-community/smartctl_exporter" arch="all" license="LGPL-3.0-or-later" depends="smartmontools" makedepends="go" install="$pkgname.pre-install" subpackages="$pkgname-openrc" source="$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz smartctl-exporter.initd smartctl-exporter.confd " builddir="$srcdir/$_pkgname-$pkgver" options="net" build() { GOLDFLAGS="-X main.Version=$pkgver" go build \ -tags netgo \ -ldflags "$GOLDFLAGS" \ -o smartctl-exporter } check() { go test -cover ./... } package() { install -Dm755 smartctl-exporter "$pkgdir"/usr/bin/smartctl-exporter install -Dm755 "$srcdir"/smartctl-exporter.initd "$pkgdir"/etc/init.d/smartctl-exporter install -Dm644 "$srcdir"/smartctl-exporter.confd "$pkgdir"/etc/conf.d/smartctl-exporter } sha512sums=" 916dfbad973a4d105467ab6b0f423d765483302a5d059a80eb7542f21c1574cca2c3028b2eda92fc0d3fab9ef8b5ae4ecfd8f69e33221e48742f08bb25a56a57 smartctl_exporter-0.9.1.tar.gz 605e753b3f90bf20c035798af9702f60d7f39d600e96a5d5b6cc8909334c2e6adb8fae6f6f3a7cfb4b097e2ceeb90257d9041d41aefa891e25aabf7cc2cac9e2 smartctl-exporter.initd cd46f20e8b479331e4e831da1dd36fcd93990904560555b5ba67d2344dc50405d8d8e4a3b03c32b1aaf969fed0a2a176c5248e671495604112fafb6dc325b999 smartctl-exporter.confd "