diff options
author | Konstantin Shalygin | 2023-02-08 12:16:27 +0700 |
---|---|---|
committer | Konstantin Shalygin | 2023-02-08 12:16:27 +0700 |
commit | 57a9a6ea21d6d36bd4130725215be87ae4fa2039 (patch) | |
tree | b0de85dec4aff4866ec98e6e91d5aa6bdf327ec1 | |
parent | 043515b475fd7fdbe4a4a78165271e61adbebd19 (diff) | |
download | aur-57a9a6ea21d6d36bd4130725215be87ae4fa2039.tar.gz |
Increase quality of PKGBUILD
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 17 |
2 files changed, 12 insertions, 10 deletions
@@ -1,5 +1,5 @@ pkgbase = snmp_exporter - pkgdesc = This is an exporter that exposes information gathered from SNMP for use by the Prometheus monitoring system + pkgdesc = SNMP exporter for Prometheus pkgver = 0.21.0 pkgrel = 1 url = https://github.com/prometheus/snmp_exporter @@ -7,8 +7,9 @@ pkgbase = snmp_exporter arch = i686 license = Apache makedepends = go + makedepends = yamllint backup = etc/prometheus/snmp.yml - source = https://github.com/prometheus/snmp_exporter/archive/v0.21.0.tar.gz + source = https://github.com/prometheus/snmp_exporter/archive/refs/tags/v0.21.0.tar.gz source = snmp_exporter.service source = snmp_exporter.sysusers sha256sums = a6ed31a8fd723a8c7d2880fd21d93fd2c9ae24fa4fdeb3834e72dccd8a3e1fb3 @@ -4,12 +4,13 @@ pkgname='snmp_exporter' pkgver='0.21.0' pkgrel='1' -pkgdesc='This is an exporter that exposes information gathered from SNMP for use by the Prometheus monitoring system' +pkgdesc='SNMP exporter for Prometheus' arch=('x86_64' 'i686') -url="https://github.com/prometheus/${pkgname}" +_uri='github.com/prometheus' +url="https://${_uri}/${pkgname}" license=('Apache') -makedepends=('go') -source=("${url}/archive/v${pkgver}.tar.gz" +makedepends=('go' 'yamllint') +source=("${url}/archive/refs/tags/v${pkgver}.tar.gz" "${pkgname}.service" "${pkgname}.sysusers") sha256sums=('a6ed31a8fd723a8c7d2880fd21d93fd2c9ae24fa4fdeb3834e72dccd8a3e1fb3' @@ -21,17 +22,17 @@ prepare() { cd "${srcdir}/${pkgname}-${pkgver}" export GOPATH="${srcdir}/gopath" export GOBIN="${GOPATH}/bin" - mkdir -p "${GOPATH}/src/github.com/prometheus" - ln -snf "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/github.com/prometheus/${pkgname}" + mkdir -p "${GOPATH}/src/${_uri}" + ln -snf "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/${_uri}/${pkgname}" } build() { - cd "${GOPATH}/src/github.com/prometheus/${pkgname}" + cd "${GOPATH}/src/${_uri}/${pkgname}" make build } package() { - pushd "${GOPATH}/src/github.com/prometheus/${pkgname}" + pushd "${GOPATH}/src/${_uri}/${pkgname}" install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm640 -o210 -g210 "snmp.yml" "${pkgdir}/etc/prometheus/snmp.yml" popd |