## START: Set by rpmautospec
## (rpmautospec version 0.7.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 27
%bcond check 1
%global debug_package %{nil}

%global crate boxcar

Name:           rust-boxcar
Version:        0.2.9
Release:        %autorelease
Summary:        Concurrent, append-only vector

License:        MIT
URL:            https://crates.io/crates/boxcar
Source:         %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          boxcar-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * Exclude benchmarks, since bench.rs carries its own MIT license and this
#   complicates packaging. We suggested this upstream in
#   https://github.com/ibraheemdev/boxcar/pull/8, which was merged, but upstream
#   subsequently decided to include benchmarks in published crates,
#   https://github.com/ibraheemdev/boxcar/commit/7131dc44d35d4b4e88d9d80374a7528c59bd6cfe.
#   This patch basically reverts that commit.
Patch:          boxcar-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24
BuildRequires:  tomcli

%global _description %{expand:
A concurrent, append-only vector.}

%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}/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
# Do not depend on criterion; it is needed only for benchmarks.
tomcli set Cargo.toml del dev-dependencies.criterion

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
## START: Generated by rpmautospec
* Sat Feb 08 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.9-1
- Update to 0.2.9 (close RHBZ#2344445)

* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Mon Dec 30 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.8-1
- Update to 0.2.8 (close RHBZ#2334879)

* Sat Nov 09 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.7-1
- Update to 0.2.7 (close RHBZ#2324505)

* Thu Oct 03 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.6-2
- Exclude (MIT-licensed) benchmarks

* Thu Oct 03 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.6-1
- Update to 0.2.6 (close RHBZ#2316243)

* Thu Aug 22 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.5-1
- Initial package (close RHBZ#2304023)
## END: Generated by rpmautospec