# Generated by rust2rpm 27
%bcond check 0

%global crate starship

Name:           rust-starship
Version:        1.25.1
Release:        1%{?dist}
Summary:        Minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️

License:        ISC
URL:            https://crates.io/crates/starship
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24
BuildRequires:  anda-srpm-macros
BuildRequires:  cmake
BuildRequires:  mold
BuildRequires:  git-core

# Old devel packages
Obsoletes:      %{name}+gix-faster-devel < 1.23.0
Obsoletes:      %{name}+gix-features-devel < 1.23.0
Obsoletes:      %{name}+gix-max-perf-devel < 1.23.0
Obsoletes:      %{name}+libz-ng-sys-devel < 1.23.0

%global _description %{expand:
The minimal, blazing-fast, and infinitely customizable prompt for any
shell! ☄🌌️.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
License:        ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-3-Clause AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND ISC AND MIT AND (MIT AND Apache-2.0) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND Unlicense AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT)

%description -n %{crate} %{_description}

%files       -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/starship

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+battery-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+battery-devel %{_description}

This package contains library source intended for building other packages which
use the "battery" feature of the "%{crate}" crate.

%files       -n %{name}+battery-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+config-schema-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+config-schema-devel %{_description}

This package contains library source intended for building other packages which
use the "config-schema" feature of the "%{crate}" crate.

%files       -n %{name}+config-schema-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+notify-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+notify-devel %{_description}

This package contains library source intended for building other packages which
use the "notify" feature of the "%{crate}" crate.

%files       -n %{name}+notify-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+notify-rust-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+notify-rust-devel %{_description}

This package contains library source intended for building other packages which
use the "notify-rust" feature of the "%{crate}" crate.

%files       -n %{name}+notify-rust-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+schemars-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+schemars-devel %{_description}

This package contains library source intended for building other packages which
use the "schemars" feature of the "%{crate}" crate.

%files       -n %{name}+schemars-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+starship-battery-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+starship-battery-devel %{_description}

This package contains library source intended for building other packages which
use the "starship-battery" feature of the "%{crate}" crate.

%files       -n %{name}+starship-battery-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
cargo add log@=0.4.22
%cargo_prep_online

%build
%dnl %cargo_build
%{cargo_license_summary_online}
%{cargo_license_online} > LICENSE.dependencies

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
%autochangelog
