Summary: Line oriented search tool using Rust's regex library
Name: ripgrep
Version: 12.1.1
-Release: 1
+Release: 2
License: MIT or Unlicense
Group: Applications
Source0: https://github.com/BurntSushi/ripgrep/archive/%{version}/%{name}-%{version}.tar.gz
ExclusiveArch: %{rust_arches}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%ifarch x32
+%define cargo_outdir target/x86_64-unknown-linux-gnux32
+%else
+%define cargo_outdir target
+%endif
+
%description
ripgrep is a line-oriented search tool that recursively searches your
current directory for a regex pattern. By default, ripgrep will
export CARGO_HOME="$(pwd)/.cargo"
%cargo_install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
-install -D target/release/build/%{name}-*/out/rg.1 $RPM_BUILD_ROOT%{_mandir}/man1/rg.1
-install -D target/release/build/%{name}-*/out/rg.bash $RPM_BUILD_ROOT%{bash_compdir}/rg
-install -D target/release/build/%{name}-*/out/rg.fish $RPM_BUILD_ROOT%{fish_compdir}/rg.fish
+install -D %{cargo_outdir}/release/build/%{name}-*/out/rg.1 $RPM_BUILD_ROOT%{_mandir}/man1/rg.1
+install -D %{cargo_outdir}/release/build/%{name}-*/out/rg.bash $RPM_BUILD_ROOT%{bash_compdir}/rg
+install -D %{cargo_outdir}/release/build/%{name}-*/out/rg.fish $RPM_BUILD_ROOT%{fish_compdir}/rg.fish
%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*