blob: 3d9c12d7fc50ab5ed25869f227ff6abca4028433 (
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
38
39
40
41
42
43
|
# Maintainer: ml <>
pkgname=kpt
pkgver=0.35.0
pkgrel=1
pkgdesc='Toolkit to manage, manipulate, customize, and apply Kubernetes Resource configurations'
arch=('x86_64')
url='https://googlecontainertools.github.io/kpt/'
license=('Apache')
depends=('git')
makedepends=('go')
optdepends=('asciinema: ttl command')
install=kpt.install
source=("https://github.com/GoogleContainerTools/kpt/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('ed237088f0851d76378c5a7cc24a9d2162773902143aeb798e22c5fd4a293c54')
prepare() {
cd "${pkgname}-${pkgver}"
go mod download
}
build() {
cd "${pkgname}-${pkgver}"
export CGO_ENABLED=1
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -modcacherw -mod=readonly -trimpath'
go build -o "$pkgname" -ldflags=-linkmode=external
}
# tests require configures Git identities
# @TODO find safe way to set Git identities without violating $HOME privacy
#check() {
# cd "${pkgname}-${pkgver}"
# # ./internal only. we don't want e2e tests
# go test -short ./internal/...
#}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 "$pkgname" -t "${pkgdir}/usr/bin"
}
|