mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-22 05:52:33 +01:00
87 lines
2.2 KiB
Plaintext
87 lines
2.2 KiB
Plaintext
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
|
|
pkgname=lima
|
|
pkgver=1.0.4
|
|
pkgrel=1
|
|
pkgdesc="Linux virtual machine launcher focusing on running containers"
|
|
url="https://lima-vm.io/"
|
|
# The only supported binary builds.
|
|
# VM templates support x86_64, aarch64, armv7 and riscv64 architectures.
|
|
arch="x86_64 aarch64"
|
|
license="Apache-2.0"
|
|
makedepends="go"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
$pkgname-guestagent:_guestagent
|
|
"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/lima-vm/lima/archive/refs/tags/v$pkgver.tar.gz
|
|
vendor-$pkgver.tar.gz::https://github.com/lima-vm/lima/releases/download/v$pkgver/lima-$pkgver-go-mod-vendor.tar.gz
|
|
"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cp -r "$srcdir"/vendor "$builddir"/
|
|
}
|
|
|
|
build() {
|
|
for binary in limactl lima-guestagent; do
|
|
go build -v \
|
|
-ldflags "-X github.com/lima-vm/lima/pkg/version.Version=v$pkgver" \
|
|
./cmd/$binary/
|
|
done
|
|
|
|
for shell in bash fish zsh; do
|
|
./limactl completion $shell > limactl.$shell
|
|
done
|
|
|
|
mkdir -p "$builddir"/man
|
|
./limactl generate-doc man
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 \
|
|
-t "$pkgdir"/usr/bin/ \
|
|
limactl \
|
|
lima-guestagent \
|
|
cmd/apptainer.lima \
|
|
cmd/docker.lima \
|
|
cmd/kubectl.lima \
|
|
cmd/lima \
|
|
cmd/nerdctl.lima \
|
|
cmd/podman.lima
|
|
|
|
install -Dm644 man/*.1 -t "$pkgdir"/usr/share/man/man1/
|
|
|
|
install -d "$pkgdir"/usr/share/doc/lima
|
|
cp -r templates/ "$pkgdir"/usr/share/doc/lima/
|
|
|
|
install -Dm644 limactl.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/limactl
|
|
install -Dm644 limactl.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/limactl.fish
|
|
install -Dm644 limactl.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_limactl
|
|
}
|
|
|
|
_guestagent() {
|
|
pkgdesc="Lima guest agent"
|
|
amove usr/bin/lima-guestagent
|
|
}
|
|
|
|
sha512sums="
|
|
7148e612979ec9a29066840857b7d79cd993251f51b6368557ce8716e03f9ced1332a9e3ad43f85723c8eb729264fbe5439f4b0a53d385d67723bf3bc2305cae lima-1.0.4.tar.gz
|
|
5d03a4dfcb3744744f9ac7c7a4b86fc3d488b4999cdb172dc0751a1f1bd54dc6fe6423b7800cb035d8cdb2c87c8baa852da8b6e0b06138fe8dd3f8abec0025b2 vendor-1.0.4.tar.gz
|
|
"
|