%define _debugsource_template %{nil} %define debug_package %{nil} %bcond_with vendored Name: starship Version: 1.25.1 Release: 1%{?dist} Summary: The cross-shell prompt for astronauts License: ISC AND MIT URL: https://starship.rs Source0: https://github.com/starship/starship/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %if %{with vendored} Source1: %{name}-%{version}-vendor.tar.zst %endif BuildRequires: rust BuildRequires: cargo BuildRequires: gcc BuildRequires: bash-completion %description The minimal, blazing-fast, and infinitely customizable prompt for any shell. %prep %autosetup -n %{name}-%{version} %if %{with vendored} tar -xaf %{SOURCE1} mkdir -p .cargo cat > .cargo/config.toml <<'EOF' [source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" EOF %endif %build export CARGO_HOME=$PWD/.cargo-home %if %{with vendored} export CARGO_NET_OFFLINE=true cargo build --release --frozen --offline %else cargo build --release %endif %install install -Dpm 0755 target/release/starship %{buildroot}%{_bindir}/starship install -d %{buildroot}%{bash_completions_dir} install -d %{buildroot}%{_datadir}/zsh/site-functions install -d %{buildroot}%{_datadir}/fish/vendor_completions.d %{buildroot}%{_bindir}/starship completions bash \ > %{buildroot}%{bash_completions_dir}/starship %{buildroot}%{_bindir}/starship completions zsh \ > %{buildroot}%{_datadir}/zsh/site-functions/_starship %{buildroot}%{_bindir}/starship completions fish \ > %{buildroot}%{_datadir}/fish/vendor_completions.d/starship.fish %files %license LICENSE %doc README.md %{_bindir}/starship %{bash_completions_dir}/starship %{_datadir}/zsh/site-functions/_starship %{_datadir}/fish/vendor_completions.d/starship.fish %changelog * Tue May 05 2026 sachesi - 1.25.1-1 - Initial package for Copr. Online build by default (--without vendored).