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

%global crate tokei

Name:           rust-tokei
Version:        12.1.2
Release:        %autorelease
Summary:        Count your code, quickly

# Upstream license specification: MIT/Apache-2.0
License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/tokei
Source0:        %{crates_source}
Source1:        LICENSE.dependencies

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
Count your code, quickly.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# * (ASL 2.0 or MIT) and BSD
# * (MIT or ASL 2.0) and Public Domain
# * ASL 2.0 or Boost
# * ASL 2.0 or MIT
# * BSD
# * MIT
# * MIT or ASL 2.0
# * Unlicense or MIT
License:        MIT and BSD and (ASL 2.0 or Boost) and Public Domain
# LICENSE.dependencies contains a full license breakdown

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

%files       -n %{crate}
%license LICENCE-APACHE
%license LICENCE-MIT
%license LICENSE.dependencies
%{_bindir}/tokei

%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}/LICENCE-APACHE
%license %{crate_instdir}/LICENCE-MIT
%{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}+all-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
cp %{SOURCE1} .
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires -a

%build
%cargo_build -a

%install
%cargo_install -a

%if %{with check}
%check
# * doctest failures caused by codegen issues with LLVM 12 on i686:
#   https://bugzilla.redhat.com/show_bug.cgi?id=2020861
# * doctest failures caused by rustc crashes with LLVM 13 on armv7hl:
#   https://bugzilla.redhat.com/show_bug.cgi?id=2045116
%cargo_test -a -- --lib
%endif

%changelog
%autochangelog