#!/bin/mkpkg
# description: Fast recursive grep using Rust regex engine
# url: https://github.com/BurntSushi/ripgrep
name=ripgrep
version=15.1.0
release=1
makedeps=(rust)
source=(https://github.com/BurntSushi/ripgrep/archive/$version.tar.gz)
renames=(ripgrep-$version.tar.gz)

sha256sums=(
    "046fa01a216793b8bd2750f9d68d4ad43986eb9c0d6122600f993906012972e8"
)

build() {
    cd $name-$version
    rm -f .cargo/config.toml
    cargo build --release --locked
    install -Dm755 target/release/rg $PKG/usr/bin/rg
    ./target/release/rg --generate man > rg.1
    install -Dm644 rg.1 $PKG/usr/share/man/man1/rg.1
    ./target/release/rg --generate complete-bash > rg.bash
    install -Dm644 rg.bash $PKG/usr/share/bash-completion/completions/rg
}

signify() {
    untrusted comment: *** OpenTUX *** public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh
