%global _trivial .0 %global _buildid .1 ## START: Set by rpmautospec ## (rpmautospec version 0.8.2) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 26 %bcond_without check %global crate ripgrep Name: rust-ripgrep Version: 14.1.1 Release: 3%{dist}%{?_trivial}%{?_buildid} Summary: Line-oriented search tool License: Unlicense OR MIT URL: https://crates.io/crates/ripgrep Source: ripgrep-14.1.1.crate Source1: vendor-20250919.tar.gz Source2: changelog # Automatically generated patch to strip dependencies and normalize metadata Patch: ripgrep-fix-metadata-auto.diff BuildRequires: rust-toolset BuildRequires: rust BuildRequires: cargo BuildRequires: llvm BuildRequires: clang %global _description %{expand: Ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern while respecting gitignore rules. ripgrep has first class support on Windows, macOS and Linux.} %description %{_description} %package -n %{crate} Summary: %{summary} # (Apache-2.0 OR MIT) AND BSD-3-Clause # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 OR BSL-1.0 # MIT # MIT OR Apache-2.0 # Unlicense OR MIT License: BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license COPYING %license LICENSE-MIT %license UNLICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc CHANGELOG.md %doc FAQ.md %doc GUIDE.md %doc README.md %doc RELEASE-CHECKLIST.md %{_bindir}/rg %{_mandir}/man1/rg.1* %{bash_completions_dir}/rg.bash %{fish_completions_dir}/rg.fish %{zsh_completions_dir}/_rg %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor %build %cargo_build -a %{cargo_license_summary -a} %{cargo_vendor_manifest} %{cargo_license -a} > LICENSE.dependencies %install %cargo_install -a # generate and install manpage target/release/rg --generate man > rg.1 install -Dpm 0644 rg.1 -t %{buildroot}/%{_mandir}/man1/ # generate and install shell completions target/release/rg --generate complete-bash > rg.bash target/release/rg --generate complete-fish > rg.fish target/release/rg --generate complete-zsh > _rg install -Dpm 0644 rg.bash -t %{buildroot}/%{bash_completions_dir} install -Dpm 0644 rg.fish -t %{buildroot}/%{fish_completions_dir} install -Dpm 0644 _rg -t %{buildroot}/%{zsh_completions_dir} %if %{with check} %check %cargo_test -a %endif %changelog