2021-07-24 10:50:29 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
pkgname=cloud-hypervisor
|
2022-03-16 23:12:39 +00:00
|
|
|
pkgver=22.1
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A Virtual Machine Monitor for modern cloud workloads"
|
2021-12-13 21:27:59 +00:00
|
|
|
url="https://www.cloudhypervisor.org"
|
2021-07-24 10:00:43 +00:00
|
|
|
arch=('x86_64')
|
|
|
|
license=('Apache')
|
2021-12-13 22:00:58 +00:00
|
|
|
depends=('gcc-libs')
|
2022-01-21 06:24:45 +00:00
|
|
|
makedepends=('git' 'rust')
|
2021-12-13 21:27:59 +00:00
|
|
|
optdepends=('qemu-headless: for virtiofsd')
|
2021-12-13 22:00:58 +00:00
|
|
|
install="$pkgname.install"
|
2022-01-21 06:24:45 +00:00
|
|
|
options=('!lto')
|
2022-03-16 23:12:39 +00:00
|
|
|
_commit='f6557acf6080bc1354c50b843f0a635c6de40f28' # v22.1
|
2022-01-21 06:24:45 +00:00
|
|
|
source=("$pkgname::git+https://github.com/cloud-hypervisor/cloud-hypervisor.git#commit=$_commit")
|
|
|
|
b2sums=('SKIP')
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd "$pkgname"
|
|
|
|
git describe --tags | sed 's/^v//'
|
|
|
|
}
|
2021-07-24 10:50:29 +00:00
|
|
|
|
|
|
|
prepare() {
|
2022-01-21 06:24:45 +00:00
|
|
|
cd "$pkgname"
|
2021-12-13 21:27:59 +00:00
|
|
|
|
|
|
|
# download dependencies
|
2021-09-09 17:48:11 +00:00
|
|
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
2021-07-24 10:50:29 +00:00
|
|
|
}
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
build() {
|
2022-01-21 06:24:45 +00:00
|
|
|
cd "$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
# FTBFS: --all-features due to hypervisor not compiling
|
2022-01-21 06:24:45 +00:00
|
|
|
# cargo build --release --frozen --all-features
|
2021-09-09 17:48:11 +00:00
|
|
|
cargo build --release --frozen
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-01-21 06:24:45 +00:00
|
|
|
find "$pkgname/target/release" \
|
2021-07-24 10:50:29 +00:00
|
|
|
-maxdepth 1 \
|
|
|
|
-executable \
|
|
|
|
-type f \
|
|
|
|
-exec install -vDm755 -t "$pkgdir/usr/bin" "{}" \+
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|