alpine-overlay/kubezero/falcoctl/APKBUILD

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-11-08 13:00:26 +00:00
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=falcoctl
pkgver=0.6.2
pkgrel=0
pkgdesc="The official CLI tool for working with Falco and its ecosystem components."
url="https://github.com/falcosecurity/falcoctl"
arch="x86_64 aarch64"
license="AGPL-3.0"
# requires go > 1.20, we only have 1.20 in 3.18 so hack
makedepends="bash"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/falcosecurity/falcoctl/archive/refs/tags/v$pkgver.tar.gz
"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOBIN="$GOPATH/bin"
build() {
# Hack until go 1.21 is stable
doas apk add go@edge-community
make GOFLAGS="-buildmode=pie -v" GOLDFLAGS="-extldflags=-static -w -s" falcoctl
# cleanup 444 files
go clean -modcache
}
package() {
mkdir -p "$pkgdir/usr/bin"
install -Dm755 falcoctl "$pkgdir/usr/bin/falcoctl"
}
sha512sums="
e09f1e5e08e0f47d0c90ea2c93cf911ecef8179d821ed286cc7f8af78bd0db200f847d1c963c323f24eca9a854e161af36a444962330b55e696cb8e410fb5761 falcoctl-0.6.2.tar.gz
"