Blob Blame History Raw
# Generated by rust2rpm 25
%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
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * bump git2 dependency from 0.13 to 0.18
Patch:          tokei-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24

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

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# BSD-3-Clause
# MIT
# MIT OR Apache-2.0
# Unlicense OR MIT
License:        BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT)
# 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} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires -a

%build
%cargo_build -a
%{cargo_license_summary -a}
%{cargo_license -a} > LICENSE.dependencies

%install
%cargo_install -a

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

%changelog
%autochangelog