diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b564878 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/num-format-0.4.0.crate diff --git a/num-format-fix-metadata.diff b/num-format-fix-metadata.diff new file mode 100644 index 0000000..c367f9b --- /dev/null +++ b/num-format-fix-metadata.diff @@ -0,0 +1,50 @@ +--- num-format-0.4.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ num-format-0.4.0/Cargo.toml 2021-11-18T18:07:59.466061+00:00 +@@ -25,7 +25,7 @@ + license = "MIT/Apache-2.0" + repository = "https://github.com/bcmyers/num-format" + [dependencies.arrayvec] +-version = "0.4" ++version = "0.5" + default-features = false + + [dependencies.itoa] +@@ -38,7 +38,7 @@ + optional = true + + [dependencies.num-bigint] +-version = "0.2" ++version = "0.4" + optional = true + + [dependencies.serde] +@@ -61,8 +61,8 @@ + default = ["std"] + std = ["arrayvec/default", "itoa/default", "itoa/i128"] + with-num-bigint = ["num-bigint", "std"] +-with-serde = ["arrayvec/serde-1", "serde/derive"] +-with-system-locale = ["cfg-if", "encoding_rs", "lazy_static", "libc", "num-format-windows", "std", "widestring", "winapi/winnls"] ++with-serde = ["arrayvec/serde", "serde/derive"] ++with-system-locale = ["cfg-if", "encoding_rs", "lazy_static", "libc", "std"] + [target."cfg(unix)".dependencies.cfg-if] + version = "0.1" + optional = true +@@ -74,18 +74,6 @@ + [target."cfg(unix)".dependencies.libc] + version = "0.2" + optional = true +-[target."cfg(windows)".dependencies.num-format-windows] +-version = "0.3" +-optional = true +- +-[target."cfg(windows)".dependencies.widestring] +-version = "0.4" +-optional = true +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["winnls"] +-optional = true + [badges.maintenance] + status = "actively-developed" + diff --git a/rust-num-format.spec b/rust-num-format.spec new file mode 100644 index 0000000..cebf691 --- /dev/null +++ b/rust-num-format.spec @@ -0,0 +1,203 @@ +# Generated by rust2rpm 18 +%bcond_without check +%global debug_package %{nil} + +%global crate num-format + +Name: rust-%{crate} +Version: 0.4.0 +Release: %autorelease +Summary: Rust crate for producing string-representations of numbers, formatted according to international standards + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/num-format +Source: %{crates_source} +# Initial patched metadata +# Bump arrayvec to 0.5, num-bigint to 0.4 and drop Windows dependencies +Patch0: num-format-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Rust crate for producing string-representations of numbers, formatted according +to international standards.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.tpl 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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+cfg-if-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cfg-if-devel %{_description} + +This package contains library source intended for building other packages +which use "cfg-if" feature of "%{crate}" crate. + +%files -n %{name}+cfg-if-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+encoding_rs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+encoding_rs-devel %{_description} + +This package contains library source intended for building other packages +which use "encoding_rs" feature of "%{crate}" crate. + +%files -n %{name}+encoding_rs-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+lazy_static-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+lazy_static-devel %{_description} + +This package contains library source intended for building other packages +which use "lazy_static" feature of "%{crate}" crate. + +%files -n %{name}+lazy_static-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+libc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+libc-devel %{_description} + +This package contains library source intended for building other packages +which use "libc" feature of "%{crate}" crate. + +%files -n %{name}+libc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+num-bigint-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+num-bigint-devel %{_description} + +This package contains library source intended for building other packages +which use "num-bigint" feature of "%{crate}" crate. + +%files -n %{name}+num-bigint-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages +which use "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages +which use "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+with-num-bigint-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+with-num-bigint-devel %{_description} + +This package contains library source intended for building other packages +which use "with-num-bigint" feature of "%{crate}" crate. + +%files -n %{name}+with-num-bigint-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+with-serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+with-serde-devel %{_description} + +This package contains library source intended for building other packages +which use "with-serde" feature of "%{crate}" crate. + +%files -n %{name}+with-serde-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+with-system-locale-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+with-system-locale-devel %{_description} + +This package contains library source intended for building other packages +which use "with-system-locale" feature of "%{crate}" crate. + +%files -n %{name}+with-system-locale-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 +%ifarch armv7hl i686 +# https://github.com/bcmyers/num-format/issues/26 +%cargo_test -- -- --skip test_usize --skip test_non_zero_usize --skip test_isize +%else +%cargo_test +%endif +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..4f7b9d3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (num-format-0.4.0.crate) = 20f6a02dff0759f5e4cf7aea7e877a6ccb088b81f4c30dcee2b565ee91f8f2d25d9c1c65f5e823f5c7f2d9a36851396865ee1a6ec9264352b8ab3481783dbd4c