1 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
2 # Contributor: Jakob Gahde <j5lx@fmail.co.uk>
4 pkgname=prometheus-mysqld-exporter
7 pkgdesc="Prometheus exporter for MySQL server metrics"
9 url="https://github.com/prometheus/mysqld_exporter"
14 backup=('etc/conf.d/prometheus-mysqld-exporter')
15 source=("mysql_exporter-${pkgver}.tar.gz::https://github.com/prometheus/mysqld_exporter/archive/v${pkgver}.tar.gz"
16 "prometheus-mysqld-exporter.service"
17 "prometheus-mysqld-exporter.conf")
18 sha512sums=('9e40d2cf3c634909c51655808f73666c423df71fef2a617b434ef47721c3a9beecc530a232259f546eb536e2c16eaea5b35b42b9777441fc1276062b13dde5ec'
19 '50619f4fa62c97c9c3533dc6a18024e2f2548e72b79e4cabae766d8b2135b4a5fdc9a6af87a279ecbae9101feac642851f2e239333a181b0db8d48af75eeac6c'
20 'c13a99a42e5a28e2be1287c337aa0f351dc8ffdbafb903e51a360d00aecf1d49d2b28b73e3741cdf681cb18c33546ae2088a8dab8bc4908b5c5ef008500b40fb')
23 cd "mysqld_exporter-${pkgver}"
30 -ldflags "-extldflags ${LDFLAGS}
31 -X github.com/prometheus/common/version.Version=${pkgver} \
32 -X github.com/prometheus/common/version.Revision=${pkgver} \
33 -X github.com/prometheus/common/version.Branch=tarball \
34 -X github.com/prometheus/common/version.BuildUser=someone@builder \
35 -X github.com/prometheus/common/version.BuildDate=$(date -d@"${SOURCE_DATE_EPOCH}" +%Y%m%d-%T)" \
40 install -Dm644 "prometheus-mysqld-exporter.service" \
41 "${pkgdir}/usr/lib/systemd/system/prometheus-mysqld-exporter.service"
42 install -Dm644 "prometheus-mysqld-exporter.conf" \
43 "${pkgdir}/etc/conf.d/prometheus-mysqld-exporter"
45 cd "mysqld_exporter-${pkgver}"
46 install -Dm755 "mysqld_exporter" "${pkgdir}/usr/bin/prometheus-mysqld-exporter"