summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30a17844c060d063b1212453fe8337bd83d64853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer:  Antany <xiaozaihu@gmail.com>
pkgname=stratovirt
pkgver=2.1.0
pkgrel=1
pkgdesc="A light hypervisor"
arch=('x86_64')
url="https://openeuler-mirrors/stratovirt.git"
license=('Mulan PSL v2')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.xz::https://github.com/openeuler-mirror/stratovirt/archive/refs/tags/v2.1.0.tar.gz")
sha256sums=("b644e58316c81cc0195c7f74dea03430ae95b1ad9cdf11041ad495761e5bf821")

prepare() {
  cd "$pkgname-$pkgver"
  rustup target add ${arch}-unknown-linux-gnu
}

build() {
  cd "$pkgname-$pkgver"
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --release --target ${arch}-unknown-linux-gnu
}

package() {
  cd "$pkgname-$pkgver"
  install -Dm755 "target/${arch}-unknown-linux-gnu/release/$pkgname" -t "$pkgdir/usr/bin"
  install -Dm755 "target/${arch}-unknown-linux-gnu/release/ozone" -t "$pkgdir/usr/bin"
}