Blob Blame History Raw
# Generated by rust2rpm 24
%bcond_without check
%global debug_package %{nil}

%global crate escape_string

Name:           rust-escape_string
Version:        0.1.2
Release:        %autorelease
Summary:        Efficiently parse backslash-escaped strings

License:        BSD-2-Clause
URL:            https://crates.io/crates/escape_string
Source:         %{crates_source}
# https://github.com/njaard/sonnerie/pull/14
Source:         https://github.com/njaard/sonnerie/raw/b182daa96a27b44d0fa686b56e657854f97f9987/LICENSE

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
Efficiently parse backslash-escaped strings.}

%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
%{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_no_tilde} -p1
cp -p %SOURCE1 .
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
%autochangelog