blob: 70d1be92f5757d254c781be050e37142b870bc58 (
plain)
1 # Description: exporter for machine metrics
2 # URL: https://github.com/prometheus/node_exporter
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: go
5
6 name=prometheus-node_exporter
7 version=1.3.1
8 release=1
9 source=(https://github.com/prometheus/node_exporter/archive/v$version/$name-$version.tar.gz
10 prometheus-node_exporter.service)
11
12 build() {
13 cd node_exporter-$version
14
15 GOLDFLAGS="-X github.com/prometheus/common/version.Version=$version
16 -X github.com/prometheus/common/version.Revision=CRUX
17 -X github.com/prometheus/common/version.Branch=master
18 -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME
19 -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})"
20
21 go build \
22 -trimpath \
23 -buildmode=pie \
24 -mod=readonly \
25 -modcacherw \
26 -ldflags "$GOLDFLAGS" \
27 .
28
29 install -Dm755 node_exporter $PKG/usr/bin/prometheus-node-exporter
30
31 ## install rc file
32 install -Dm 755 $SRC/prometheus-node_exporter.service $PKG/etc/rc.d/prometheus-node_exporter
33 }
|