db-move: moved libdex from [staging] to [testing] (x86_64)
[arch-packages.git] / virtiofsd / trunk / PKGBUILD
blob563a7938dd21bdc19b078e5ea7693275ecf4f92c
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=virtiofsd
4 pkgver=1.6.0
5 pkgrel=2
6 pkgdesc="Vhost-user virtio-fs device backend written in Rust"
7 arch=(x86_64)
8 url="https://gitlab.com/virtio-fs/virtiofsd"
9 license=(Apache BSD)
10 depends=(
11   gcc-libs
12   glibc
13   libcap-ng
14   libseccomp
16 makedepends=(cargo)
17 replaces=(qemu-virtiofsd)
18 source=($url/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
19 sha512sums=('7036df9e576319bb599b4783b799ff0c2a56f8b17485314aec8f1663a659ce06b987362ddcb83b0eb2eb16b156ec547728584a5cc3939194ea23569dbcef77b1')
20 b2sums=('212ec1c4a06aaa021b8c42d30a44c855a98ad8add7ddd5a9f5859b3e1e8e47446b9b675f0d6dfcef9ab194b9ad63a2cb84561d2f10766a35206c28fd8bff96c3')
22 prepare() {
23   cd $pkgname-v$pkgver
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"
30 build() {
31   cd $pkgname-v$pkgver
32   export RUSTUP_TOOLCHAIN=stable
33   export CARGO_TARGET_DIR=target
34   cargo build --frozen --release --all-features
37 check() {
38   cd $pkgname-v$pkgver
39   export RUSTUP_TOOLCHAIN=stable
40   cargo test --frozen --all-features
43 package() {
44   cd $pkgname-v$pkgver
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/"