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

%global crate yaml-rust

Name:           rust-yaml-rust0.3
Version:        0.3.5
Release:        %autorelease
Summary:        YAML 1.2 parser for rust

# Upstream license specification: MIT/Apache-2.0
License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/yaml-rust
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * bump linked-hash-map dependency to allow v0.4 and v0.5:
#   https://github.com/chyh1990/yaml-rust/commit/b2ebf74
# * drop optional dependency on the old "clippy" crate
# * exclude files that are only useful for upstream development
Patch:          yaml-rust-fix-metadata.diff

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
The missing YAML 1.2 parser 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 the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%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}+linked-hash-map-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+linked-hash-map-devel %{_description}

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

%files       -n %{name}+linked-hash-map-devel
%ghost %{crate_instdir}/Cargo.toml

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

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

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

%files       -n %{name}+preserve_order-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
## START: Generated by rpmautospec
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue May 16 2023 Fabio Valentini <decathorpe@gmail.com> - 0.3.5-24
- Regenerate with rust2rpm v24

* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

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

* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

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

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

* Sun Nov  8 2020 Fabio Valentini <decathorpe@gmail.com> - 0.3.5-17
- Drop features with missing dependencies.

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue Feb 18 04:04:49 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.3.5-15
- Disable tests

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sun Jul 14 19:36:57 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-12
- Regenerate

* Sun Jul 14 12:12:50 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-11
- Regenerate

* Sun Mar 10 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-10
- Do not pull optional dependencies

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Oct 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-8
- Adapt to new packaging

* Sun Oct 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-7
- Run tests in infrastructure

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Jan 08 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.3.5-4
- Rebuild for rust-packaging v5

* Thu Nov 09 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-3
- Exclude unneeded files

* Wed Jun 14 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-2
- Port to use rust-packaging

* Sat Feb 25 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.5-1
- Initial package

## END: Generated by rpmautospec