2017-10-18 12:34:20 +02:00
|
|
|
# Maintainer: Nils Czernia <nils@czserver.de>
|
|
|
|
|
|
|
|
pkgname=prometheus-postgresql-exporter
|
2019-07-08 13:55:56 +02:00
|
|
|
pkgver=0.5.0
|
2017-10-18 12:34:20 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="Prometheus exporter for PostrgreSQL"
|
|
|
|
arch=('x86_64' 'i686')
|
|
|
|
url="https://github.com/wrouesnel/postgres_exporter"
|
|
|
|
license=('Apache')
|
|
|
|
makedepends=('git' 'go')
|
|
|
|
source=("https://github.com/wrouesnel/postgres_exporter/archive/v${pkgver}.tar.gz"
|
|
|
|
"prometheus-postgresql-exporter.service")
|
2019-07-08 13:55:56 +02:00
|
|
|
sha256sums=('a84955602d8369605aa6e12c91b21ab3864f4d655077f25b4ec0545fa8bb9b9f'
|
2017-10-18 12:34:20 +02:00
|
|
|
'cda225c236df0e2a6d71c17a5390a92ed5cc7f71b8ca5843590c59fa02cdb135')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "${srcdir}/postgres_exporter-${pkgver}"
|
|
|
|
|
|
|
|
export GOPATH="${srcdir}/gopath"
|
|
|
|
mkdir -p "${GOPATH}/src/github.com/wrouesnel"
|
|
|
|
ln -snf "${srcdir}/postgres_exporter-${pkgver}" "${GOPATH}/src/github.com/wrouesnel/postgres_exporter"
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
export GOPATH="${srcdir}/gopath"
|
|
|
|
cd "${GOPATH}/src/github.com/wrouesnel/postgres_exporter"
|
2018-12-12 08:54:18 +01:00
|
|
|
go run mage.go binary
|
2017-10-18 12:34:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
export GOPATH="${srcdir}/gopath"
|
|
|
|
cd "${GOPATH}/src/github.com/wrouesnel/postgres_exporter"
|
2018-12-12 08:54:18 +01:00
|
|
|
go run mage.go test
|
2017-10-18 12:34:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "${srcdir}/postgres_exporter-${pkgver}"
|
|
|
|
|
|
|
|
install -Dm755 "postgres_exporter" "${pkgdir}/usr/bin/prometheus_postgresql_exporter"
|
|
|
|
install -Dm755 "${srcdir}/prometheus-postgresql-exporter.service" "${pkgdir}/usr/lib/systemd/system/prometheus-postgresql-exporter.service"
|
|
|
|
}
|