1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Wesley Moore <wes@wezm.net>
6 pkgdesc='Intuitive find & replace'
8 url="https://github.com/chmln/sd"
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/chmln/sd/archive/v${pkgver}.tar.gz")
13 sha256sums=('faf33a97797b95097c08ebb7c2451ac9835907254d89863b10ab5e0813b5fe5f')
18 cargo build --release --locked
23 cargo test --release --locked
27 install -Dm755 "$pkgname-$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
28 install -Dm644 "$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
30 cd $pkgname-$pkgver/target/release/build
32 # Find and package the man page (because cargo --out-dir is too new)
33 find . -name sd.1 -type f -exec install -Dm644 {} "$pkgdir/usr/share/man/man1/sd.1" \;
35 # Find and package the bash completion file
36 find . -name sd.bash -type f -exec install -Dm644 {} "$pkgdir/usr/share/bash-completion/completions/sd" \;
38 # Find and package the zsh completion file (not in zsh-completions yet)
39 find . -name _sd -type f -exec install -Dm644 {} "$pkgdir/usr/share/zsh/site-functions/_sd" \;
41 # Find and package the fish completion file
42 find . -name sd.fish -type f -exec install -Dm644 {} "$pkgdir/usr/share/fish/vendor_completions.d/sd.fish" \;