blob: 36c75e3ab90583c53273cdcaae876855c189b5cc (
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
|
pkgname=svix-cli
pkgver=0.21.1
pkgrel=1
pkgdesc='The Svix CLI (webhooks as a service)'
arch=('x86_64')
url="https://www.svix.com"
license=('GPL')
makedepends=('go')
source=("https://github.com/svixhq/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('22d4e02f40e11ed5103cd83a6ec83032f91ceea0aefee5c5c67230bb5aa0953d')
prepare(){
cd "$pkgname-$pkgver"
mkdir -p build/
}
build() {
cd "$pkgname-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -ldflags "-s -w -X github.com/svix/svix-cli/version.Version=v$pkgver" -o build ./...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 build/$pkgname "$pkgdir"/usr/bin/svix
"$pkgdir"/usr/bin/svix completion bash > bash-svix
install -D bash-svix "$pkgdir"/etc/bash_completion.d/svix
"$pkgdir"/usr/bin/svix completion zsh > zsh-svix
install -D zsh-svix "$pkgdir"/usr/share/zsh/site-functions/_svix
}
|