blob: cef873fe0ac7ddaa4254f62546b44f512249bbfa (
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
|
pkgname="carapace"
pkgver=1.1.1
pkgrel=1
pkgdesc="multi-shell multi-command argument completer"
arch=("x86_64")
url="https://carapace.sh/"
license=("MIT")
depends=("glibc")
makedepends=("go")
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/carapace-sh/carapace-bin/archive/refs/tags/v${pkgver}.tar.gz"
)
sha256sums=('c479ef19a9d1b5a8579abb2da437afe7fb024ab23d11feadf746ffda0bbc833a')
build(){
cd "${srcdir}/carapace-bin-${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 generate ./cmd/...
go build -v -ldflags="-X main.version=v${pkgver}" ./cmd/carapace
}
check(){
cd "${srcdir}/carapace-bin-${pkgver}"
go test -v ./cmd/...
}
package(){
cd "${srcdir}/carapace-bin-${pkgver}"
install -Dm755 carapace \
"${pkgdir}/usr/bin/carapace"
install -Dm644 LICENSE \
"${pkgdir}/usr/share/licenses/carapace/LICENSE"
}
|