Blob Blame History Raw
# Generated by rust2rpm 20
%bcond_without check

%global crate lsd

Name:           rust-%{crate}
Version:        0.20.1
Release:        %autorelease
Summary:        Ls command with a lot of pretty colors and some other stuff

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            https://crates.io/crates/lsd
Source:         %{crates_source}
# Initial patched metadata
# * drop windows-only dependencies
# * normalize weird glob-style dependencies to SemVer compatible format
# * bump assert_cmd from 1 to 2
Patch0:         lsd-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging

%global _description %{expand:
Ls command with a lot of pretty colors and some other stuff.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# Install all deps (without check), grab their licenses and make it simple
# * ASL 2.0 or MIT
# * MIT
# * MIT or ASL 2.0
# * Unlicense or MIT
License:        ASL 2.0 and MIT

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

%files       -n %{crate}
%license LICENSE
%doc doc README.md CHANGELOG.md
%{_bindir}/lsd

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
%autochangelog