|
1 |
| -# Maintainer: Cody Schafer <[email protected]> |
| 1 | +# Maintainer: Roald Clark <[email protected]> |
| 2 | +# Contributor: Cody Schafer <[email protected]> |
2 | 3 |
|
3 | 4 | pkgname=grpcurl
|
4 | 5 | pkgver=1.9.1
|
5 | 6 | pkgrel=1
|
6 | 7 | pkgdesc="Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers"
|
7 |
| -arch=(x86_64) |
8 |
| -url="https://github.com/fullstorydev/grpcurl" |
| 8 | +arch=('x86_64') |
| 9 | +url="https://github.com/fullstorydev/${pkgname}" |
9 | 10 | license=('MIT')
|
| 11 | +depends=('glibc') |
10 | 12 | makedepends=('go')
|
11 |
| -source=( |
12 |
| - "$pkgname-$pkgver.tar.gz::https://github.com/fullstorydev/grpcurl/archive/v$pkgver.tar.gz" |
13 |
| -) |
14 |
| -sha384sums=('eefb6ad6e1e797254ee4cd31bdd2775ba4aef464bee9b9ee9d5ea16a2cc0f431c5408b6600b53d5ab1c2376c13ae6695') |
15 |
| -# really, `grpcurl-bin` should be conflicting with us instead of the oposite |
16 |
| -conflicts=('grpcurl-bin') |
| 13 | +conflicts=("${pkgname}-bin" "${pkgname}-git") |
| 14 | +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") |
| 15 | +b2sums=('b9ebf4c5d531172cb5cf40d07551cb3540add1dffe8b0d185fd1d1f4fcfe1ec7264a1d02e896fa6c6618e569f1bb2d888ff9de82763e18e13001e258cbb75282') |
17 | 16 |
|
18 | 17 | prepare() {
|
19 |
| - cd "$pkgname-$pkgver" |
20 |
| - mkdir -p build |
| 18 | + cd "${srcdir}/${pkgname}-${pkgver}" |
| 19 | + mkdir -p build |
21 | 20 | }
|
22 | 21 |
|
23 | 22 | build() {
|
24 |
| - cd "$pkgname-$pkgver" |
25 |
| - export CGO_CPPFLAGS="${CPPFLAGS}" |
26 |
| - export CGO_CFLAGS="${CFLAGS}" |
27 |
| - export CGO_CXXFLAGS="${CXXFLAGS}" |
28 |
| - export CGO_LDFLAGS="${LDFLAGS}" |
29 |
| - export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" |
30 |
| - go build -o build ./cmd/... |
| 23 | + cd "${srcdir}/${pkgname}-${pkgver}" |
| 24 | + export CGO_CFLAGS="${CFLAGS}" |
| 25 | + export CGO_CPPFLAGS="${CPPFLAGS}" |
| 26 | + export CGO_CXXFLAGS="${CXXFLAGS}" |
| 27 | + export CGO_LDFLAGS="${LDFLAGS}" |
| 28 | + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" |
| 29 | + go build -o build ./cmd/... |
31 | 30 | }
|
32 | 31 |
|
33 | 32 | check() {
|
34 |
| - cd "$pkgname-$pkgver" |
35 |
| - go test ./... |
| 33 | + cd "${srcdir}/${pkgname}-${pkgver}" |
| 34 | + go test ./... |
36 | 35 | }
|
37 | 36 |
|
38 | 37 | package() {
|
39 |
| - cd "$pkgname-$pkgver" |
40 |
| - install -Dm755 build/grpcurl "${pkgdir}/usr/bin/grpcurl" |
41 |
| - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" |
| 38 | + cd "${srcdir}/${pkgname}-${pkgver}" |
| 39 | + install -Dm0644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/" |
| 40 | + install -Dm0755 "build/${pkgname}" -t "${pkgdir}/usr/bin/" |
42 | 41 | }
|
0 commit comments