# Maintainer: Matthias Lisin pkgname=golangci-lint pkgdesc="Linters Runner for Go. 5x faster than gometalinter." pkgver=1.23.2 _commit=567904e # 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=('1330d8e96167161c61080d38b576293d049a4ac71be1077e47ec37385629d64abbe5f1b60f63eb6f6a86d66622cd8c40328f1a49a2ffcba0ab5ca1dbdbb79c97') 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" }