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-08-20 00:31:21 +00:00
|
|
|
pkgver=26.0
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
2022-04-14 21:43:30 +00:00
|
|
|
pkgdesc='A Virtual Machine Monitor for modern cloud workloads'
|
|
|
|
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-08-20 00:31:21 +00:00
|
|
|
_commit='ed9e54d6c712f3721266fbcf9f1ae0c0f7ecf869'
|
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
|
|
|
}
|