summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Shalygin2023-02-08 12:16:27 +0700
committerKonstantin Shalygin2023-02-08 12:16:27 +0700
commit57a9a6ea21d6d36bd4130725215be87ae4fa2039 (patch)
treeb0de85dec4aff4866ec98e6e91d5aa6bdf327ec1
parent043515b475fd7fdbe4a4a78165271e61adbebd19 (diff)
downloadaur-57a9a6ea21d6d36bd4130725215be87ae4fa2039.tar.gz
Increase quality of PKGBUILD
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD17
2 files changed, 12 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4fb0803288d8..5b39c1c71c97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 4433c0e7ad35..33c6c55f9491 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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