File rust-snapbox.spec of Package rust-snapbox

#
# spec file for package rust-snapbox
#
# Copyright (c) 2024 u <u>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

# Generated by rust2rpm 26
%bcond_without check

%global crate snapbox

Name:           rust-snapbox
Version:        0.5.9
Release:        0
Summary:        Snapshot testing toolbox
Group:          Development/Libraries/Rust

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/snapbox
Source:         https://crates.io/api/v1/crates/%crate/%version/download#/%crate-%version.crate
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          snapbox-fix-metadata-auto.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  cargo-rpm-macros >= 24
BuildRequires:  (crate(anstream/default) >= 0.6.7 with crate(anstream/default) < 0.7.0~)
BuildRequires:  (crate(anstyle/default) >= 1.0.0 with crate(anstyle/default) < 2.0.0~)
BuildRequires:  (crate(normalize-line-endings/default) >= 0.3.0 with crate(normalize-line-endings/default) < 0.4.0~)
BuildRequires:  (crate(similar/default) >= 2.1.0 with crate(similar/default) < 3.0.0~)
BuildRequires:  (crate(similar/inline) >= 2.1.0 with crate(similar/inline) < 3.0.0~)
BuildRequires:  (crate(snapbox-macros/color) >= 0.3.8 with crate(snapbox-macros/color) < 0.4.0~)
BuildRequires:  (crate(snapbox-macros/default) >= 0.3.8 with crate(snapbox-macros/default) < 0.4.0~)
BuildRequires:  rust >= 1.70.0

%global _description %{expand:
Snapshot testing toolbox.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
Group:          # FIXME
# FIXME: paste output of %%cargo_license_summary here
License:        # FIXME
# LICENSE.dependencies contains a full license breakdown

%description -n %{crate} %{_description}

%files       -n %{crate}
%license LICENSE-APACHE
%license LICENSE-MIT
%license LICENSE.dependencies
%doc README.md
%{_bindir}/snap-fixture

%package        devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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}
Group:          Development/Libraries/Rust
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}+cmd-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+color-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+color-auto-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+color-auto-devel %{_description}

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

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

%package     -n %{name}+debug-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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}+detect-encoding-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+detect-encoding-devel %{_description}

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

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

%package     -n %{name}+diff-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+document-features-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+document-features-devel %{_description}

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

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

%package     -n %{name}+examples-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+harness-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+json-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+path-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+structured-data-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+structured-data-devel %{_description}

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

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

%package     -n %{name}+term-svg-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+term-svg-devel %{_description}

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

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

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies

%install
%cargo_install

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

%changelog
* Fri Apr 12 01:42:27 +03 2024 u <u>
- Version 0.5.9
- Initial package
openSUSE Build Service is sponsored by