Blob Blame History Raw
# Generated by rust2rpm 18
%bcond_without check
%global debug_package %{nil}

%global crate fasteval

Name:           rust-%{crate}
Version:        0.2.4
Release:        %autorelease
Summary:        Fast evaluation of algebraic expressions

# Upstream license specification: MIT
License:        MIT
URL:            https://crates.io/crates/fasteval
Source:         %{crates_source}

# https://github.com/likebike/fasteval/pull/17
Patch:          0001-Rust-can-parse-Very-Long-nine-tails-since-1.55.0.patch
# https://github.com/likebike/fasteval/pull/18
Patch:          0002-Docs-avoid-doc-test-error-when-unsafe-vars-are-not-e.patch
Patch:          0003-Docs-markdown-syntax-fix.patch
Patch:          0001-tests-update-to-scientic-notation.patch

ExclusiveArch:  %{rust_arches}
%if %{__cargo_skip_build}
BuildArch:      noarch
%endif

BuildRequires:  rust-packaging

%global _description %{expand:
Fast evaluation of algebraic expressions.}

%description %{_description}

%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 LICENSE
%doc CHANGELOG.md README.md
%{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}+alpha-keywords-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+alpha-keywords-devel %{_description}

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

%files       -n %{name}+alpha-keywords-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

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

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

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

%files       -n %{name}+nightly-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

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

%description -n %{name}+unsafe-vars-devel %{_description}

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

%files       -n %{name}+unsafe-vars-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

%build
%cargo_build

%install
%cargo_install

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

%changelog
%autochangelog