## START: Set by rpmautospec
## (rpmautospec version 0.6.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    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 26
%bcond_without check
%global debug_package %{nil}

%global crate instant

Name:           rust-instant
Version:        0.1.13
Release:        %autorelease
Summary:        Partial replacement for std::time::Instant that works on WASM too

License:        BSD-3-Clause
URL:            https://crates.io/crates/instant
Source:         %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          instant-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * remove WASM-specific features and dependencies
Patch:          instant-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
A partial replacement for std::time::Instant that works on WASM too.}

%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
%doc %{crate_instdir}/AUTHORS
%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

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

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

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

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

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

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

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

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

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# drop WASM-specific tests
rm tests/wasm.rs

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
## START: Generated by rpmautospec
* Tue Jun 11 2024 Fabio Valentini <decathorpe@gmail.com> - 0.1.13-1
- Update to version 0.1.13; Fixes RHBZ#2281044

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

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

* Thu May 25 2023 Fabio Valentini <decathorpe@gmail.com> - 0.1.12-5
- Regenerate with rust2rpm v24

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

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

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

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Dec 30 11:39:38 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.1.9-1
- Update to 0.1.9

* Tue Aug 25 16:17:36 PDT 2020 Josh Stone <jistone@redhat.com> - 0.1.6-1
- Initial package

## END: Generated by rpmautospec