# Maintainer: Matthias Lisin pkgname=golangci-lint pkgdesc="Linters Runner for Go. 5x faster than gometalinter." pkgver=1.22.2 _commit=cb2f8ba # short commit hash of release pkgrel=1 arch=('x86_64' 'i686' 'aarch64' 'armv7h' 'armv6h') url='https://github.com/golangci/golangci-lint' license=('GPL3') makedepends=('git' 'go') source=("$pkgname-$pkgver.tar.gz::https://github.com/golangci/golangci-lint/archive/v${pkgver}.tar.gz") sha512sums=('caef4e873abc27eea09822aed2b5fffccb28a066f41746b1b9fa20f699da74b1531c303fd45422780aed9843a8807e9a67d33529791f2407bacef15c91027cda') build() { cd "${pkgname}-${pkgver}" export GOPATH="$srcdir" # ISO-8601, like the official binary _date=$(date -u -Iseconds -d "@${SOURCE_DATE_EPOCH}" | sed 's/+00:00/Z/') go build -trimpath \ -ldflags "-X 'main.version=${pkgver}' \ -X 'main.commit=${_commit}' \ -X 'main.date=${_date}' \ -extldflags=${LDFLAGS}" \ -buildmode=pie -o "$pkgname" ./cmd/"$pkgname" } package() { cd "${pkgname}-${pkgver}" install -Dm755 "$pkgname" "$pkgdir"/usr/bin/"$pkgname" }