0f0ee7e
# Generated by rust2rpm 25
58f86fd
%bcond_without check
3a4fdb8
%global debug_package %{nil}
3a4fdb8
3a4fdb8
%global crate tendril
3a4fdb8
b8ff3fa
Name:           rust-tendril
11a9219
Version:        0.4.3
bb25a7b
Release:        %autorelease
3a4fdb8
Summary:        Compact buffer/string type for zero-copy parsing
3a4fdb8
3a4fdb8
# Upstream license specification: MIT/Apache-2.0
b8ff3fa
License:        MIT OR Apache-2.0
3a4fdb8
URL:            https://crates.io/crates/tendril
3a4fdb8
Source:         %{crates_source}
0f0ee7e
# Manually created patch for downstream crate metadata changes
0f0ee7e
# * drop unused support for the obsolete "encoding" crate
0f0ee7e
Patch:          tendril-fix-metadata.diff
3a4fdb8
0f0ee7e
BuildRequires:  cargo-rpm-macros >= 24
3a4fdb8
58f86fd
%global _description %{expand:
58f86fd
Compact buffer/string type for zero-copy parsing.}
3a4fdb8
3a4fdb8
%description %{_description}
3a4fdb8
3a4fdb8
%package        devel
3a4fdb8
Summary:        %{summary}
3a4fdb8
BuildArch:      noarch
3a4fdb8
3a4fdb8
%description    devel %{_description}
3a4fdb8
11a9219
This package contains library source intended for building other packages which
11a9219
use the "%{crate}" crate.
3a4fdb8
3a4fdb8
%files          devel
11a9219
%license %{crate_instdir}/LICENSE-APACHE
11a9219
%license %{crate_instdir}/LICENSE-MIT
11a9219
%doc %{crate_instdir}/README.md
11a9219
%{crate_instdir}/
3a4fdb8
3a4fdb8
%package     -n %{name}+default-devel
3a4fdb8
Summary:        %{summary}
3a4fdb8
BuildArch:      noarch
3a4fdb8
3a4fdb8
%description -n %{name}+default-devel %{_description}
3a4fdb8
11a9219
This package contains library source intended for building other packages which
11a9219
use the "default" feature of the "%{crate}" crate.
3a4fdb8
3a4fdb8
%files       -n %{name}+default-devel
11a9219
%ghost %{crate_instdir}/Cargo.toml
3a4fdb8
3a4fdb8
%package     -n %{name}+bench-devel
3a4fdb8
Summary:        %{summary}
3a4fdb8
BuildArch:      noarch
3a4fdb8
3a4fdb8
%description -n %{name}+bench-devel %{_description}
3a4fdb8
11a9219
This package contains library source intended for building other packages which
11a9219
use the "bench" feature of the "%{crate}" crate.
3a4fdb8
3a4fdb8
%files       -n %{name}+bench-devel
11a9219
%ghost %{crate_instdir}/Cargo.toml
3a4fdb8
3a4fdb8
%package     -n %{name}+encoding_rs-devel
3a4fdb8
Summary:        %{summary}
3a4fdb8
BuildArch:      noarch
3a4fdb8
3a4fdb8
%description -n %{name}+encoding_rs-devel %{_description}
3a4fdb8
11a9219
This package contains library source intended for building other packages which
11a9219
use the "encoding_rs" feature of the "%{crate}" crate.
3a4fdb8
3a4fdb8
%files       -n %{name}+encoding_rs-devel
11a9219
%ghost %{crate_instdir}/Cargo.toml
3a4fdb8
3a4fdb8
%prep
0f0ee7e
%autosetup -n %{crate}-%{version} -p1
3a4fdb8
%cargo_prep
3a4fdb8
58f86fd
%generate_buildrequires
58f86fd
%cargo_generate_buildrequires
58f86fd
3a4fdb8
%build
3a4fdb8
%cargo_build
3a4fdb8
3a4fdb8
%install
3a4fdb8
%cargo_install
3a4fdb8
3a4fdb8
%if %{with check}
3a4fdb8
%check
6b4629f
# * skip test for exact size of a struct / enum that fails with Rust 1.64+:
6b4629f
#   https://github.com/servo/tendril/issues/66
6b4629f
%cargo_test -- -- --skip assert_sizes
3a4fdb8
%endif
3a4fdb8
3a4fdb8
%changelog
bb25a7b
%autochangelog