%global debug_package %{nil} %bcond check 0 Name: rs-edit Version: 0.1.0 Release: %autorelease Summary: Rust structural search-and-replace CLI. License: GPL-2.0-only URL: https://src00.lsme.ca/devops/rs-edit Source0: %{name}-v%{version}.tar.gz BuildRequires: cargo BuildRequires: rust %description %{summary}. %prep %autosetup -n %{name} %build export RUSTFLAGS="%build_rustflags" cargo build --release --locked %if %{with check} %check export RUSTFLAGS="%build_rustflags" cargo test --locked %endif %install install -D -m 0755 target/release/rs-edit %{buildroot}%{_bindir}/rs-edit %files %license LICENSE %{_bindir}/rs-edit %changelog %autochangelog