## START: Set by rpmautospec
## (rpmautospec version 0.5.1)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}

%global crate cpufeatures

# compile and run tests only on supported architectures
%global supported_arches x86_64 aarch64 %{ix86}

Name:           rust-cpufeatures
Version:        0.2.12
Release:        %autorelease
Summary:        Lightweight runtime CPU feature detection for x86/x86_64 and aarch64

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/cpufeatures
Source:         %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          cpufeatures-fix-metadata-auto.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Lightweight runtime CPU feature detection for aarch64, loongarch64, and
x86/x86_64 targets,  with no_std support and support for mobile targets
including Android and iOS.}

%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}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/CHANGELOG.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

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%ifarch %{supported_arches}
%cargo_build
%endif

%install
%cargo_install

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

%changelog
## START: Generated by rpmautospec
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jan 05 2024 Fabio Valentini <decathorpe@gmail.com> - 0.2.12-1
- Update to version 0.2.12; Fixes RHBZ#2256867

* Fri Nov 10 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.11-1
- Update to version 0.2.11; Fixes RHBZ#2246432

* Wed Oct 25 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.10-1
- Update to version 0.2.10; Fixes RHBZ#2245284

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Wed Jul 05 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.9-1
- Update to version 0.2.9; Fixes RHBZ#2219807

* Fri Jun 23 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.8-1
- Update to version 0.2.8; Fixes RHBZ#2215391

* Fri Apr 21 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.7-1
- Update to version 0.2.7; Fixes RHBZ#2188485

* Sun Mar 26 2023 Fabio Valentini <decathorpe@gmail.com> - 0.2.6-1
- Update to version 0.2.6; Fixes RHBZ#2181694

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Mon Sep 05 2022 Fabio Valentini <decathorpe@gmail.com> - 0.2.5-1
- Update to version 0.2.5; Fixes RHBZ#2120376

* Sat Aug 20 2022 Fabio Valentini <decathorpe@gmail.com> - 0.2.3-1
- Update to version 0.2.3; Fixes RHBZ#2119327

* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Mar 21 2022 Fabio Valentini <decathorpe@gmail.com> - 0.2.2-1
- Update to version 0.2.2; Fixes RHBZ#2065834

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Wed Sep 29 2021 Fabio Valentini <decathorpe@gmail.com> - 0.2.1-1
- Update to version 0.2.1; Fixes RHBZ#1998507

* Tue Aug 24 2021 Fabio Valentini <decathorpe@gmail.com> - 0.1.5-2
- Build everywhere, but compile and run tests only on supported arches

* Tue Jul 27 2021 Fabio Valentini <decathorpe@gmail.com> - 0.1.5-1
- Initial import (#1981110)
## END: Generated by rpmautospec