diff --git a/ripgrep/.SRCINFO b/ripgrep/.SRCINFO new file mode 100644 index 0000000000..f49935284e --- /dev/null +++ b/ripgrep/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = ripgrep + pkgdesc = A search tool that combines the usability of ag with the raw speed of grep + pkgver = 14.1.1 + pkgrel = 1 + url = https://github.com/BurntSushi/ripgrep + arch = x86_64 + license = MIT + license = custom + makedepends = rust + depends = gcc-libs + depends = pcre2 + source = ripgrep-14.1.1.tar.gz::https://github.com/BurntSushi/ripgrep/archive/14.1.1.tar.gz + sha512sums = 6aacbc99025c1c0c301491574953bed4d7dd04f9ce7ce999c47eaa50d71ea7edd905f718e2e94031a5ad651d4daebce772c57ed291c639938991ad4574be8244 + +pkgname = ripgrep diff --git a/ripgrep/.nvchecker.toml b/ripgrep/.nvchecker.toml new file mode 100644 index 0000000000..ecb4519953 --- /dev/null +++ b/ripgrep/.nvchecker.toml @@ -0,0 +1,3 @@ +[ripgrep] +source = "git" +git = "https://github.com/BurntSushi/ripgrep.git" diff --git a/ripgrep/PKGBUILD b/ripgrep/PKGBUILD new file mode 100644 index 0000000000..9c054b5cab --- /dev/null +++ b/ripgrep/PKGBUILD @@ -0,0 +1,50 @@ +# POWER Maintainer: Alexander Baldeck +# Maintainer: Sven-Hendrik Haase +# Contributor: Maxim Baz +# Contributor: Andrew Gallant +pkgname=ripgrep +pkgver=14.1.1 +pkgrel=1 +pkgdesc="A search tool that combines the usability of ag with the raw speed of grep" +arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) +url="https://github.com/BurntSushi/ripgrep" +license=('MIT' 'custom') +depends=('gcc-libs' 'pcre2') +makedepends=('rust') +source=("$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz") +sha512sums=('6aacbc99025c1c0c301491574953bed4d7dd04f9ce7ce999c47eaa50d71ea7edd905f718e2e94031a5ad651d4daebce772c57ed291c639938991ad4574be8244') + +build() { + cd "$pkgname-$pkgver" + + cargo build --release --locked --features 'pcre2' +} + +check() { + cd "$pkgname-$pkgver" + + cargo test --release --locked --features 'pcre2' +} + +package() { + cd "$pkgname-$pkgver" + + install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg" + + mkdir -p "$pkgdir/usr/share/zsh/site-functions" + target/release/rg --generate complete-zsh > "$pkgdir/usr/share/zsh/site-functions/_rg" + + mkdir -p "$pkgdir/usr/share/bash-completion/completions" + target/release/rg --generate complete-bash > "$pkgdir/usr/share/bash-completion/completions/rg" + + mkdir -p "$pkgdir/usr/share/fish/vendor_completions.d" + target/release/rg --generate complete-fish > "$pkgdir/usr/share/fish/vendor_completions.d/rg.fish" + + mkdir -p "$pkgdir/usr/share/man/man1" + target/release/rg --generate man > "$pkgdir/usr/share/man/man1/rg.1" + + install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md" + install -Dm644 "COPYING" "$pkgdir/usr/share/licenses/${pkgname}/COPYING" + install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT" + install -Dm644 "UNLICENSE" "$pkgdir/usr/share/licenses/${pkgname}/UNLICENSE" +}