rust-tokei/rust-tokei.spec

172 lines
4.5 KiB
RPMSpec

# Generated by rust2rpm 16
%bcond_without check
%global crate tokei
Name: rust-%{crate}
Version: 12.0.4
Release: %autorelease
Summary: Utility that allows you to count code, quickly
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/tokei
Source: %{crates_source}
# Initial patched metadata
# * Bump to parking_lot 0.11, https://github.com/XAMPPRocky/tokei/pull/575
# * Bump to dashmap 4.0.1, https://github.com/XAMPPRocky/tokei/pull/680
Patch0: tokei-fix-metadata.diff
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Utility that allows you to count code, quickly.}
%description %{_description}
%if ! %{__cargo_skip_build}
%package -n %{crate}
Summary: %{summary}
# * (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
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENCE-MIT LICENCE-APACHE
%{_bindir}/tokei
%endif
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENCE-MIT LICENCE-APACHE
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "all" feature of "%{crate}" crate.
%files -n %{name}+all-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "cbor" feature of "%{crate}" crate.
%files -n %{name}+cbor-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "hex" feature of "%{crate}" crate.
%files -n %{name}+hex-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "serde_cbor" feature of "%{crate}" crate.
%files -n %{name}+serde_cbor-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "serde_yaml" feature of "%{crate}" crate.
%files -n %{name}+serde_yaml-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "yaml" feature of "%{crate}" crate.
%files -n %{name}+yaml-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%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