# Generated by rust2rpm 25
# * missing dev-dependencies: goldenfile ^1.5.2
%bcond_with check
%global debug_package %{nil}

%global crate quick-junit

Name:           rust-quick-junit
Version:        0.3.5
Release:        %autorelease
Summary:        Data model and serializer for JUnit/XUnit XML

License:        Apache-2.0 OR MIT
URL:            https://crates.io/crates/quick-junit
Source:         %{crates_source}
# https://github.com/nextest-rs/nextest/pull/1150
Source:         https://github.com/nextest-rs/nextest/raw/quick-junit-%{version}/LICENSE-APACHE
Source:         https://github.com/nextest-rs/nextest/raw/quick-junit-%{version}/LICENSE-MIT
# Manually created patch for downstream crate metadata changes
# * drop unused nextest-workspace-hack dependency
Patch:          quick-junit-fix-metadata.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Data model and serializer for JUnit/XUnit XML.}

%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
cp -pav %{SOURCE1} %{SOURCE2} .

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
%autochangelog