archrelease: copy trunk to community-any
[ArchLinux/community.git] / dummyhttp / repos / community-x86_64 / PKGBUILD
blobca070241db6fe22f2f3ecbbfb61d2827383b7462
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 pkgname=dummyhttp
3 pkgver=1.0.3
4 pkgrel=1
5 pkgdesc="Super simple HTTP server that replies a fixed body with a fixed response code"
6 arch=('x86_64')
7 url="https://github.com/svenstaro/dummyhttp"
8 license=('MIT')
9 depends=('gcc-libs')
10 makedepends=('rust')
11 options=('!lto')
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/svenstaro/dummyhttp/archive/v${pkgver}.tar.gz")
13 sha512sums=('57dfeac8f9774d647b7ce09ec6a413f5ca3140500099fda7a7819134146eba105012a629e6e050eedb2ee1ecd026e25ff55bb0acee1fe460f24c8027df6f802a')
15 build() {
16   cd "$srcdir/$pkgname-$pkgver"
18   cargo build --release --locked
21 package() {
22   cd "$srcdir/$pkgname-$pkgver"
24   install -Dm755 target/release/dummyhttp "$pkgdir"/usr/bin/dummyhttp
26   mkdir -p "$pkgdir"/usr/share/{bash-completion/completions,zsh/site-functions,fish/vendor_completions.d}
27   target/release/dummyhttp --print-completions bash > "$pkgdir"/usr/share/bash-completion/completions/dummyhttp
28   target/release/dummyhttp --print-completions zsh > "$pkgdir"/usr/share/zsh/site-functions/_dummyhttp
29   target/release/dummyhttp --print-completions fish > "$pkgdir"/usr/share/fish/vendor_completions.d/dummyhttp.fish
31   mkdir -p "$pkgdir"/usr/share/man/man1
32   target/release/dummyhttp --print-manpage | gzip > "$pkgdir"/usr/share/man/man1/$pkgname.1.gz
34   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
37 # vim:set ts=2 sw=2 et: