# Generated by rust2rpm 24
%bcond_without check
%global crate lsd
Name: rust-lsd
Version: 0.23.1
Release: %autorelease
Summary: Ls command with a lot of pretty colors and some other stuff
License: Apache-2.0
URL: https://crates.io/crates/lsd
Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
Patch: lsd-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * remove compiler settings that are incompatible with RPM packaging
# * normalize weird glob-style dependencies to SemVer compatible format
# * bump chrono-humanize dependency from 0.1 to 0.2
# * bump lscolors dependency from 0.9 to 0.13
# * bump assert_cmd dev-dependency from 1 to 2
Patch: lsd-fix-metadata.diff
BuildRequires: rust-packaging >= 23
%global _description %{expand:
An ls command with a lot of pretty colors and some other stuff.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR Zlib
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License: Apache-2.0 AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc CHANGELOG.md
%doc README.md
%{_bindir}/lsd
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
%if %{with check}
%check
# * skip tests that rely on files that are not included in published crates
# * skip a broken test (our "cargo test" CLI arguments somehow leak into it)
%cargo_test -- -- --skip color::theme::tests --skip test_symlink_arrow_from_args_none
%endif
%changelog
%autochangelog