# Generated by rust2rpm 20
%bcond_without check
%global debug_package %{nil}
%global crate unicode-segmentation
Name: rust-%{crate}
Version: 1.9.0
Release: %autorelease
Summary: Grapheme Cluster, Word and Sentence boundaries
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/unicode-segmentation
Source: %{crates_source}
# Initial patched metadata
# * bump quickcheck from 0.7 to 0.9:
# https://github.com/unicode-rs/unicode-segmentation/pull/60
# * exclude scripts that are only useful for upstream
# * drop unused, benchmark-only criterion dev-dependency to speed up builds
Patch0: unicode-segmentation-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
%global _description %{expand:
Grapheme Cluster, Word and Sentence boundaries according to Unicode Standard
Annex #29 rules.}
%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 COPYRIGHT LICENSE-APACHE LICENSE-MIT
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+no_std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+no_std-devel %{_description}
This package contains library source intended for building other packages which
use the "no_std" feature of the "%{crate}" crate.
%files -n %{name}+no_std-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog