arch-pkgs/cloud-hypervisor/PKGBUILD
2021-12-13 21:27:59 +00:00

36 lines
1.2 KiB
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=cloud-hypervisor
pkgver=20.1
pkgrel=1
pkgdesc="A Virtual Machine Monitor for modern cloud workloads"
url="https://www.cloudhypervisor.org"
arch=('x86_64')
license=('Apache')
makedepends=('rust')
optdepends=('qemu-headless: for virtiofsd')
source=("$pkgname-$pkgver.tar.gz::https://github.com/cloud-hypervisor/cloud-hypervisor/archive/v$pkgver.tar.gz")
sha512sums=('229d081b9bacc048287e84d268c48443f456b9eadd14e812d818900d67e88f12f60eaa2503ffecd0017a5db147063f63165b6d702413fb7ebeeaaf2acd08113c')
b2sums=('0e44ff622e84443aadba36479ee6f7394b88649c927a9671598d39953906dd464a0d5b71d29e3086c6cace5bc8f97a07f39795cacb5bba851805ab475692db1f')
prepare() {
cd "$pkgname-$pkgver"
# download dependencies
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
# FTBFS: --all-features due to hypervisor not compiling
# cargo build --release --locked --all-features --target-dir=target
cargo build --release --frozen
}
package() {
find "$pkgname-$pkgver/target/release" \
-maxdepth 1 \
-executable \
-type f \
-exec install -vDm755 -t "$pkgdir/usr/bin" "{}" \+
}