1 # Maintainer: Johannes Löthberg <johannes@kyriasis.com>
3 pkgname=prometheus-node-exporter
7 pkgdesc='Exporter for machine metrics'
8 url='https://github.com/prometheus/node_exporter'
13 makedepends=('go' 'git')
16 backup=('etc/conf.d/prometheus-node-exporter')
18 source=("$pkgname-$pkgver.tar.gz::https://github.com/prometheus/node_exporter/archive/v$pkgver.tar.gz"
19 prometheus-node-exporter.conf
20 prometheus-node-exporter.service
21 prometheus-node-exporter.sysusers)
23 sha256sums=('67c6d59359d8c484e1e28d0a52a971eebe687f083c5fbb35c5e651543e5d0ea4'
24 'ce93e2b95bfc86a8a046e2f9175408e1cbffa784fd3b65dd141fde70b5bb2585'
25 '457e305760323f941d20248e2ca5817ae4a8b5586f79a2331b968bf3baa66c5b'
26 'c7fd0b1793dfe7a354a28e978d3c79e7195eaf43376b9eece37e996fe0772c5c')
29 cd node_exporter-$pkgver
36 -ldflags "-linkmode external -extldflags ${LDFLAGS} \
37 -X github.com/prometheus/common/version.Version=$pkgver \
38 -X github.com/prometheus/common/version.Revision=$pkgver \
39 -X github.com/prometheus/common/version.Branch=tarball \
40 -X github.com/prometheus/common/version.BuildUser=someone@builder \
41 -X github.com/prometheus/common/version.BuildDate=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d-%H:%M:%S)" \
46 cd node_exporter-$pkgver
52 install -Dm644 prometheus-node-exporter.conf "$pkgdir"/etc/conf.d/prometheus-node-exporter
53 install -Dm644 prometheus-node-exporter.service "$pkgdir"/usr/lib/systemd/system/prometheus-node-exporter.service
54 install -Dm644 prometheus-node-exporter.sysusers "$pkgdir"/usr/lib/sysusers.d/prometheus-node-exporter.conf
56 cd node_exporter-$pkgver
58 install -Dm755 node_exporter "$pkgdir"/usr/bin/prometheus-node-exporter