blob: 67830f33f6f82b2a87f43649e1756a21af8adb18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# Maintainer: Laura Demkowicz-Duffy <dev@demkowiczduffy.co.uk>
pkgname=protolint
pkgver=0.52.0
pkgrel=1
pkgdesc="A pluggable linter and fixer to enforce Protocol Buffer style and conventions"
arch=('x86_64')
url="https://github.com/yoheimuta/protolint"
license=('MIT')
depends=(glibc)
makedepends=(go)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('4a5d866a9d64ce36ce08df2c2352230c3e831e9695c3bdd76933fcc199b68529')
build() {
cd "$pkgname-$pkgver"
export GOFLAGS="-trimpath -buildmode=pie -mod=readonly -modcacherw -ldflags=-linkmode=external"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build ./cmd/protolint
go build ./cmd/protoc-gen-protolint
}
check() {
cd "$pkgname-$pkgver"
# tests fail with arch goflags
GOFLAGS="" make test
}
package() {
cd "$pkgname-$pkgver"
install -Dm 0755 protolint "$pkgdir/usr/bin/protolint"
install -Dm 0755 protoc-gen-protolint "$pkgdir/usr/bin/protoc-gen-protolint"
install -Dm 0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm 0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|