# Contributor: Michał Polański # Maintainer: Michał Polański pkgname=miniserve pkgver=0.24.0 pkgrel=0 pkgdesc="Quickly serve files via HTTP" url="https://github.com/svenstaro/miniserve" license="MIT" # ring arch="all !ppc64le !s390x !riscv64" makedepends="cargo cargo-auditable" subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/svenstaro/miniserve/archive/v$pkgver/miniserve-$pkgver.tar.gz webpki.patch " prepare() { default_prepare cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build --frozen --release ./target/release/miniserve --print-manpage > $pkgname.1 ./target/release/miniserve --print-completions bash > $pkgname.bash ./target/release/miniserve --print-completions fish > $pkgname.fish ./target/release/miniserve --print-completions zsh > $pkgname.zsh } check() { # seem to be broken in fakepty test but -q qrcode output works fine cargo test --frozen -- \ --skip 'qrcode_shown_in_tty_when_enabled' \ --skip 'qrcode_hidden_in_tty_when_disabled' } package() { install -Dm755 target/release/miniserve "$pkgdir"/usr/bin/miniserve install -Dm644 $pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1 install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" 58cd66c3e4afcfa79857854dd304638be63a6075687608241d99eee4e429b56b167b8f4f0f0ce67fa874ba5a22b8e08de9f8e30e08ee9cfaf857766681f7d6af miniserve-0.24.0.tar.gz a14e5c65d870f1e34099c2cf8d4af7d42423f25612f57a4e16b6fada381a3f47ec45c08158e0070463905566b9294fdfd5f92445be45f4e2574feede404be998 webpki.patch "