diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a1f2a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ryu-0.2.3.crate diff --git a/rust-ryu.spec b/rust-ryu.spec new file mode 100644 index 0000000..4ed24b8 --- /dev/null +++ b/rust-ryu.spec @@ -0,0 +1,63 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate ryu + +Name: rust-%{crate} +Version: 0.2.3 +Release: 1%{?dist} +Summary: Fast floating point to string conversion + +License: ASL 2.0 +URL: https://crates.io/crates/ryu +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * no-panic is nightly +Patch0: ryu-0.2.3-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(num_cpus) >= 1.8.0 with crate(num_cpus) < 2.0.0) +BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Fast floating point to string conversion. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE-APACHE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sat Aug 18 2018 Igor Gnatenko - 0.2.3-1 +- Initial package diff --git a/ryu-0.2.3-fix-metadata.diff b/ryu-0.2.3-fix-metadata.diff new file mode 100644 index 0000000..2875c7c --- /dev/null +++ b/ryu-0.2.3-fix-metadata.diff @@ -0,0 +1,12 @@ +--- ryu-0.2.3/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ ryu-0.2.3/Cargo.toml 2018-08-18T10:28:43.004059+02:00 +@@ -24,9 +24,6 @@ + [[example]] + name = "benchmark" + path = "benchmark/benchmark.rs" +-[dependencies.no-panic] +-version = "0.1" +-optional = true + [dev-dependencies.num_cpus] + version = "1.8" + diff --git a/sources b/sources new file mode 100644 index 0000000..829d50f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ryu-0.2.3.crate) = d7580338830c6c901df1d36459eb1dd1beda27a4399b315b104838c53d38a240288dc9dca64514a4f56a69522bcba8111172f6beb3d8124dda77f085cd2333c0