1 # Maintainer: David Runge <dvzrv@archlinux.org>
6 pkgdesc="Vhost-user virtio-fs device backend written in Rust"
8 url="https://gitlab.com/virtio-fs/virtiofsd"
17 replaces=(qemu-virtiofsd)
18 source=($url/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
19 sha512sums=('7036df9e576319bb599b4783b799ff0c2a56f8b17485314aec8f1663a659ce06b987362ddcb83b0eb2eb16b156ec547728584a5cc3939194ea23569dbcef77b1')
20 b2sums=('212ec1c4a06aaa021b8c42d30a44c855a98ad8add7ddd5a9f5859b3e1e8e47446b9b675f0d6dfcef9ab194b9ad63a2cb84561d2f10766a35206c28fd8bff96c3')
24 # use /usr/lib instead of /usr/libexec: https://gitlab.com/virtio-fs/virtiofsd/-/issues/86
25 sed 's/libexec/lib/' -i 50-qemu-$pkgname.json
27 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
32 export RUSTUP_TOOLCHAIN=stable
33 export CARGO_TARGET_DIR=target
34 cargo build --frozen --release --all-features
39 export RUSTUP_TOOLCHAIN=stable
40 cargo test --frozen --all-features
45 install -vDm 755 target/release/$pkgname -t "$pkgdir/usr/lib/"
46 install -vDm 644 50-qemu-$pkgname.json -t "$pkgdir/usr/share/qemu/vhost-user/"
47 install -vDm 644 LICENSE* -t "$pkgdir/usr/share/licenses/$pkgname/"
48 install -vDm 644 README.md doc/*.md -t "$pkgdir/usr/share/doc/$pkgname/"