updpkg: golangci-lint 1.16.0-3

Make reproducible! (hopefully)
This commit is contained in:
Matthias Lisin 2019-05-04 22:37:01 +02:00
parent 88fa7c0677
commit 3f7d586c58
2 changed files with 5 additions and 11 deletions

View File

@ -1,7 +1,7 @@
pkgbase = golangci-lint pkgbase = golangci-lint
pkgdesc = Linters Runner for Go. 5x faster than gometalinter. pkgdesc = Linters Runner for Go. 5x faster than gometalinter.
pkgver = 1.16.0 pkgver = 1.16.0
pkgrel = 2 pkgrel = 3
url = https://github.com/golangci/golangci-lint url = https://github.com/golangci/golangci-lint
arch = any arch = any
license = GPL3 license = GPL3

View File

@ -3,7 +3,7 @@ pkgname=golangci-lint
pkgdesc="Linters Runner for Go. 5x faster than gometalinter." pkgdesc="Linters Runner for Go. 5x faster than gometalinter."
pkgver=1.16.0 pkgver=1.16.0
_commit=97ea1cb # short commit has of release _commit=97ea1cb # short commit has of release
pkgrel=2 pkgrel=3
arch=('any') arch=('any')
url='https://github.com/golangci/golangci-lint' url='https://github.com/golangci/golangci-lint'
license=('GPL3') license=('GPL3')
@ -13,22 +13,16 @@ conflicts=('golangci-lint' 'golangci-lint-git')
source=("https://github.com/golangci/golangci-lint/archive/v${pkgver}.tar.gz") source=("https://github.com/golangci/golangci-lint/archive/v${pkgver}.tar.gz")
sha512sums=('1b0c63ca31c93761d24071cac8eb27278075230f9f93026d9b38e106069f9ecc5618621372ef4a4a886ef3791b50d953fd7c9889e7443960bff18a1d72cfcda9') sha512sums=('1b0c63ca31c93761d24071cac8eb27278075230f9f93026d9b38e106069f9ecc5618621372ef4a4a886ef3791b50d953fd7c9889e7443960bff18a1d72cfcda9')
prepare() {
cd "${pkgname}-${pkgver}"
export GOPATH="$srcdir/gopath"
go get
}
build() { build() {
cd "${pkgname}-${pkgver}" cd "${pkgname}-${pkgver}"
export GOPATH="$srcdir/gopath" export GOPATH="$srcdir"
# ISO-8601, like the official binary # ISO-8601, like the official binary
_date=$(date -u -Iseconds -d "@${SOURCE_DATE_EPOCH}" | sed 's/+00:00/Z/') _date=$(date -u -Iseconds -d "@${SOURCE_DATE_EPOCH}" | sed 's/+00:00/Z/')
LDFLAGS+=" -X 'main.version=${pkgver}'" LDFLAGS+=" -X 'main.version=${pkgver}'"
LDFLAGS+=" -X 'main.commit=${_commit}'" LDFLAGS+=" -X 'main.commit=${_commit}'"
LDFLAGS+=" -X 'main.date=${_date}'" LDFLAGS+=" -X 'main.date=${_date}'"
go build -gcflags "all=-trimpath=${PWD}" \ go build -gcflags "all=-trimpath=${GOPATH}" \
-asmflags "all=-trimpath=${PWD}" \ -asmflags "all=-trimpath=${GOPATH}" \
-ldflags "-extldflags=${LDFLAGS}" \ -ldflags "-extldflags=${LDFLAGS}" \
-o "$pkgname" ./cmd/"$pkgname" -o "$pkgname" ./cmd/"$pkgname"
} }