079a2fb
# Generated by rust2rpm 24
268150f
%bcond_without check
473c8b4
%global debug_package %{nil}
473c8b4
473c8b4
%global crate number_prefix
473c8b4
079a2fb
Name:           rust-number_prefix
34f4780
Version:        0.4.0
db5efa6
Release:        %autorelease
34f4780
Summary:        Library for numeric prefixes (kilo, giga, kibi)
473c8b4
473c8b4
License:        MIT
473c8b4
URL:            https://crates.io/crates/number_prefix
079a2fb
Source0:        %{crates_source}
079a2fb
Source1:        https://github.com/ogham/rust-number-prefix/raw/v%{version}/LICENCE
079a2fb
# Manually created patch for downstream crate metadata changes
079a2fb
# * do not exclude license text from installed files
079a2fb
#   https://github.com/ogham/rust-number-prefix/pull/8
079a2fb
Patch:          number_prefix-fix-metadata.diff
473c8b4
079a2fb
BuildRequires:  rust-packaging >= 21
473c8b4
268150f
%global _description %{expand:
34f4780
Library for numeric prefixes (kilo, giga, kibi).}
67a3ab3
67a3ab3
%description %{_description}
473c8b4
473c8b4
%package        devel
473c8b4
Summary:        %{summary}
473c8b4
BuildArch:      noarch
473c8b4
67a3ab3
%description    devel %{_description}
473c8b4
079a2fb
This package contains library source intended for building other packages which
079a2fb
use the "%{crate}" crate.
67a3ab3
67a3ab3
%files          devel
079a2fb
%license %{crate_instdir}/LICENCE
079a2fb
%{crate_instdir}/
67a3ab3
67a3ab3
%package     -n %{name}+default-devel
67a3ab3
Summary:        %{summary}
67a3ab3
BuildArch:      noarch
67a3ab3
67a3ab3
%description -n %{name}+default-devel %{_description}
67a3ab3
079a2fb
This package contains library source intended for building other packages which
079a2fb
use the "default" feature of the "%{crate}" crate.
67a3ab3
67a3ab3
%files       -n %{name}+default-devel
079a2fb
%ghost %{crate_instdir}/Cargo.toml
473c8b4
507feac
%package     -n %{name}+std-devel
507feac
Summary:        %{summary}
507feac
BuildArch:      noarch
507feac
507feac
%description -n %{name}+std-devel %{_description}
507feac
079a2fb
This package contains library source intended for building other packages which
079a2fb
use the "std" feature of the "%{crate}" crate.
507feac
507feac
%files       -n %{name}+std-devel
079a2fb
%ghost %{crate_instdir}/Cargo.toml
507feac
473c8b4
%prep
507feac
%autosetup -n %{crate}-%{version_no_tilde} -p1
473c8b4
%cargo_prep
079a2fb
cp -pav %{SOURCE1} .
473c8b4
87abb43
%generate_buildrequires
87abb43
%cargo_generate_buildrequires
87abb43
473c8b4
%build
473c8b4
%cargo_build
473c8b4
473c8b4
%install
473c8b4
%cargo_install
473c8b4
473c8b4
%if %{with check}
473c8b4
%check
473c8b4
%cargo_test
473c8b4
%endif
473c8b4
473c8b4
%changelog
db5efa6
%autochangelog