# Generated by rust2rpm %bcond_without check %global crate tokei Name: rust-%{crate} Version: 6.1.2 Release: 1%{?dist} Summary: Utility that allows you to count code, quickly License: MIT or ASL 2.0 URL: https://crates.io/crates/tokei Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump handlebars to 0.29 # * Bump ignore to 0.3 # * Bump rayon to 0.9 # https://github.com/Aaronepower/tokei/pull/158 Patch0: tokei-6.1.2-fix-metadata.diff # Make it work with handlebars v0.29 Patch1: 0001-bump-handlebars-to-0.29.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(clap) >= 2.24.0 with crate(clap) < 3.0.0) BuildRequires: (crate(encoding) >= 0.2.0 with crate(encoding) < 0.3.0) BuildRequires: (crate(env_logger) >= 0.4.0 with crate(env_logger) < 0.5.0) BuildRequires: (crate(errln) >= 0.1.0 with crate(errln) < 0.2.0) BuildRequires: (crate(hex) >= 0.2.0 with crate(hex) < 0.3.0) BuildRequires: (crate(ignore) >= 0.3.0 with crate(ignore) < 0.4.0) BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) BuildRequires: (crate(rayon) >= 0.9.0 with crate(rayon) < 0.10.0) BuildRequires: (crate(regex) >= 0.2.0 with crate(regex) < 0.3.0) BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) BuildRequires: (crate(serde_cbor) >= 0.6.0 with crate(serde_cbor) < 0.7.0) BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) BuildRequires: (crate(serde_yaml) >= 0.7.0 with crate(serde_yaml) < 0.8.0) BuildRequires: (crate(toml) >= 0.4.0 with crate(toml) < 0.5.0) # [build-dependencies] BuildRequires: (crate(handlebars) >= 0.29.0 with crate(handlebars) < 0.30.0) BuildRequires: (crate(ignore) >= 0.3.0 with crate(ignore) < 0.4.0) BuildRequires: (crate(lazy_static) >= 0.2.0 with crate(lazy_static) < 0.3.0) BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(lazy_static) >= 0.2.0 with crate(lazy_static) < 0.3.0) BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) %endif %description %{summary}. %package -n %{crate} Summary: %{summary} %description -n %{crate} A utility that allows you to count code, quickly. %package devel Summary: %{summary} BuildArch: noarch %description devel A simple, effcient library for counting code in directories. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %files -n %{crate} %license LICENSE-MIT LICENSE-APACHE %{_bindir}/tokei %files devel %license LICENSE-MIT LICENSE-APACHE %{cargo_registry}/%{crate}-%{version}/ %changelog * Tue Nov 14 2017 Igor Gnatenko - 6.1.2-1 - Initial package