blob: 1987e86d615b49a94010b12138fd580185d4990d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Maintainer: Sebastian Krebs <sebastian[at]krebs.one>
pkgname=prometheus-process-exporter
pkgver=0.8.4
pkgrel=1
pkgdesc="Prometheus exporter that mines /proc to report on selected processes"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/ncabatoff/process-exporter"
license=('MIT')
depends=('glibc')
makedepends=('git' 'go')
source=("https://github.com/ncabatoff/process-exporter/archive/v${pkgver}.tar.gz")
sha256sums=('69cdc7903a1f61d1257fc2beaf90a341612ee1c4431b268929c587274496fc96')
prepare() {
cd "${srcdir}/process-exporter-${pkgver}"
export GOPATH="${srcdir}/gopath"
export GOBIN="${GOPATH}/bin"
mkdir -p "${GOPATH}/src/github.com/ncabatoff"
ln -snf "${srcdir}/process-exporter-${pkgver}" "${GOPATH}/src/github.com/ncabatoff/process-exporter"
}
build() {
export GOPATH="${srcdir}/gopath"
cd "${GOPATH}/src/github.com/ncabatoff/process-exporter"
make build
}
check() {
export GOPATH="${srcdir}/gopath"
cd "${GOPATH}/src/github.com/ncabatoff/process-exporter"
make test
}
package() {
install -Dm755 "${srcdir}/process-exporter-${pkgver}/process-exporter" "${pkgdir}/usr/bin/process-exporter"
install -Dm644 "${srcdir}/process-exporter-${pkgver}/packaging/process-exporter.service" \
"${pkgdir}/usr/lib/systemd/system/process-exporter.service"
install -Dm644 "${srcdir}/process-exporter-${pkgver}/packaging/conf/all.yaml" \
"${pkgdir}/etc/process-exporter/all.yaml"
}
|