Skip to content

Commit b40fb0d

Browse files
committed
grpcurl: update_on github
- Change the update source from AUR to GitHub Signed-off-by: Roald Clark <[email protected]>
1 parent aba2cff commit b40fb0d

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

archlinuxcn/grpcurl/PKGBUILD

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
1-
# Maintainer: Cody Schafer <[email protected]>
1+
# Maintainer: Roald Clark <[email protected]>
2+
# Contributor: Cody Schafer <[email protected]>
23

34
pkgname=grpcurl
45
pkgver=1.9.1
56
pkgrel=1
67
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}"
910
license=('MIT')
11+
depends=('glibc')
1012
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')
1716

1817
prepare() {
19-
cd "$pkgname-$pkgver"
20-
mkdir -p build
18+
cd "${srcdir}/${pkgname}-${pkgver}"
19+
mkdir -p build
2120
}
2221

2322
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/...
3130
}
3231

3332
check() {
34-
cd "$pkgname-$pkgver"
35-
go test ./...
33+
cd "${srcdir}/${pkgname}-${pkgver}"
34+
go test ./...
3635
}
3736

3837
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/"
4241
}

archlinuxcn/grpcurl/lilac.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
build_prefix: extra-x86_64
2-
pre_build_script: aur_pre_build(maintainers=['codyps', 'yibe'])
3-
post_build: aur_post_build
2+
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
3+
post_build: git_pkgbuild_commit()
44
update_on:
5-
- source: aur
6-
aur: grpcurl
5+
- source: github
6+
github: fullstorydev/grpcurl
7+
use_latest_release: true
8+
include_regex: '^v\d+\.\d+\.\d+$'
9+
prefix: 'v'
710
- source: manual
8-
manual: 1
11+
manual: 1.1
912

1013
maintainers:
1114
- github: roaldclark

0 commit comments

Comments
 (0)