%global package_version 0.12.5 %define _build_id_links none %define debug_package %{nil} Name: rgx Version: %{package_version} Release: 1%{?dist} Summary: A terminal regex tester with real-time matching and multi-engine support License: Apache-2.0 OR MIT URL: https://github.com/brevity1swos/rgx Source0: %{URL}/archive/refs/tags/v%{package_version}.tar.gz#/%{name}-%{package_version}.tar.gz BuildRequires: git-core BuildRequires: rust BuildRequires: cargo Requires: pcre2 >= 10.46 %description regex101 for the terminal — real-time matching, 3 engines, capture groups, replace mode, syntax highlighting, plain-English explanations, undo/redo, mouse support. Written in Rust. %prep %autosetup -n %{name}-%{package_version} %build cargo build --release --all-features target/release/%{name} --completions bash > rgx.bash target/release/%{name} --completions fish > rgx.fish target/release/%{name} --completions zsh > rgx.zsh %install install -Dpm 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 rgx.bash %{buildroot}%{bash_completions_dir}/rgx.bash install -Dpm 0644 rgx.fish %{buildroot}%{fish_completions_dir}/rgx.fish install -Dpm 0644 rgx.zsh %{buildroot}%{zsh_completions_dir}/_rgx %files %license LICENSE-APACHE %license LICENSE-MIT %doc README.md %{_bindir}/%{name} %{bash_completions_dir}/rgx.bash %{fish_completions_dir}/rgx.fish %{zsh_completions_dir}/_rgx %changelog %autochangelog