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

%global crate bumpalo

Name:           rust-%{crate}
Version:        3.7.0
Release:        %autorelease
Summary:        Fast bump allocation arena for Rust

# Upstream license specification: MIT/Apache-2.0
License:        MIT or ASL 2.0
URL:            https://crates.io/crates/bumpalo
Source:         %{crates_source}

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

BuildRequires:  rust-packaging

# https://bugzilla.redhat.com/show_bug.cgi?id=1853366
%if %{with check}
#BuildRequires:  cargo-readme
%endif

%global _description %{expand:
Fast bump allocation arena for Rust.}

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

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

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

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

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

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

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

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

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

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

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

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

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# remove executable bit which breaks brp-mangle-shebangs
chmod -x tests/allocator_api.rs
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%ifarch armv7hl i686
%cargo_test -- -- --skip    readme_up_to_date \
                            alloc_slice_fill_zero \
                            oom_instead_of_bump_pointer_overflow
%else
# https://bugzilla.redhat.com/show_bug.cgi?id=1853366
%cargo_test -- -- --skip readme_up_to_date
%endif
%endif

%changelog
%autochangelog