Blob Blame History Raw
# Generated by rust2rpm 24
# * missing dev-dependencies: metrohash
%bcond_with check
%global debug_package %{nil}

%global crate im-rc

Name:           rust-im-rc
Version:        15.1.0
Release:        %autorelease
Summary:        Immutable collection datatypes (the fast but not thread safe version)

License:        MPL-2.0
URL:            https://crates.io/crates/im-rc
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * fix invalid SPDX identifier in crate license:
#   https://github.com/bodil/im-rs/issues/210
# * drop optional "pool" feature with missing "refpool" dependency
Patch:          im-rc-fix-metadata.diff

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
Immutable collection datatypes (the fast but not thread safe version).}

%description %{_description}

%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.md
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/CODE_OF_CONDUCT.md
%doc %{crate_instdir}/README.md
%{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}+arbitrary-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

%files       -n %{name}+arbitrary-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+debug-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+proptest-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+quickcheck-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+rayon-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+serde-devel
%ghost %{crate_instdir}/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