## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 3;
    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 logos-codegen

Name:           rust-logos-codegen
Version:        0.14.2
Release:        %autorelease
Summary:        Create ridiculously fast Lexers

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/logos-codegen
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * Allow rstest 0.23 (https://github.com/maciejhirsz/logos/pull/438)
Patch:          logos-codegen-fix-metadata.diff
# * Fix issue with s390x test failure
# * https://github.com/maciejhirsz/logos/pull/431
Patch2:        rust-logos-codegen-0.14.2-Fix_s390x_issue.patch

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Create ridiculously fast Lexers.}

%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}+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}+forbid_unsafe-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

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

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

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

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

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

%prep
%autosetup -n %{crate}-%{version} -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
* Fri Nov 15 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.2-3
- Allow rstest 0.23

* Thu Oct 17 2024 Cristian Le <cristian.le@mpsd.mpg.de> - 0.14.2-2
- Fix test failures in s390x

* Tue Oct 01 2024 Cristian Le <cristian.le@mpsd.mpg.de> - 0.14.2-1
- Bump to logos 0.14.2 rhbz#2263176

* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

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

* Fri Nov 03 2023 Seth <sethmb@pm.me> - 0.13.0-2
- Initial import (fedora#2245445)

* Fri Nov 03 2023 Seth <sethmb@pm.me> - 0.13.0-1
- Initial import (fedora#2245445)
## END: Generated by rpmautospec