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=('ed398c96f16ef520546052bbebe65ae5b4e6818692d4389aa6ace4eb0a9d3cd4b9f3c6b00790b99c4215ceac9eead36a20ae2e18cc8298defb901d9916c241df')
20 b2sums=('e1fad99baef1a6d2a399107422cfbeede365325d1f2e71e3944bc9db41578320a8c0272550597f05741a171ce4a6426338a3255adabcf948735704f3adc1156b')
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/"