arch-pkgs/cloud-hypervisor/PKGBUILD
2021-10-15 07:02:27 +00:00

34 lines
1.1 KiB
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=cloud-hypervisor
pkgver=19.0
pkgrel=1
pkgdesc="A Virtual Machine Monitor for modern cloud workloads"
url="https://github.com/cloud-hypervisor/cloud-hypervisor"
arch=('x86_64')
license=('Apache')
makedepends=('rust')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('59a0157d715e5ccb9ce21ad9313e60a48ccce79f5696417c075d57f65150f621aa354dacb0aebcb7eed83e44b830c871986d55cf7078ce3da6cc5def629f6f62')
b2sums=('8f4d861732962a22010416621a9743cfa1a3bac1a62957e653f659d3d3a5febd5f9a6c9ecec2aec009541340584711a62a167286f1ba7c5f24bfda2802b0c332')
prepare() {
cd "$pkgname-$pkgver"
# fetch all 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" "{}" \+
}