%define _debugsource_template %{nil} %define debug_package %{nil} Name: sd Version: 1.1.0 Release: 1%{?dist} Summary: Intuitive find & replace CLI (sed alternative) License: MIT URL: https://github.com/chmln/sd Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cargo BuildRequires: rust >= 1.70 BuildRequires: gcc BuildRequires: bash-completion %description sd is an intuitive find and replace command-line tool, it is an alternative to sed. %prep %autosetup -n %{name}-%{version} %build export CARGO_HOME=$PWD/.cargo-home cargo build --release %install install -Dpm 0755 target/release/sd %{buildroot}%{_bindir}/sd # Install man page install -Dpm 0644 gen/sd.1 %{buildroot}%{_mandir}/man1/sd.1 # Install shell completions install -d %{buildroot}%{bash_completions_dir} install -d %{buildroot}%{_datadir}/zsh/site-functions install -d %{buildroot}%{_datadir}/fish/vendor_completions.d cp gen/completions/sd.bash %{buildroot}%{bash_completions_dir}/sd cp gen/completions/_sd %{buildroot}%{_datadir}/zsh/site-functions/_sd cp gen/completions/sd.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/sd.fish %check test -x %{buildroot}%{_bindir}/sd %{buildroot}%{_bindir}/sd --version %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/sd %{_mandir}/man1/sd.1* %{bash_completions_dir}/sd %{_datadir}/zsh/site-functions/_sd %{_datadir}/fish/vendor_completions.d/sd.fish %changelog * Fri Jun 12 2026 sachesi - 1.1.0-1 - Initial package for Copr.