From 07c8d720dfc54c5594cb99aececc6ab5d3753ed3 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Oct 31 2018 10:45:22 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/rand-0.4.2-fix-metadata.diff b/rand-0.4.2-fix-metadata.diff deleted file mode 100644 index 81c6ea2..0000000 --- a/rand-0.4.2-fix-metadata.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- rand-0.4.2/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ rand-0.4.2/Cargo.toml 2018-01-06T13:44:52.496038+01:00 -@@ -22,6 +22,7 @@ - categories = ["algorithms"] - license = "MIT/Apache-2.0" - repository = "https://github.com/rust-lang-nursery/rand" -+exclude = ["utils/*.py"] - - [features] - alloc = [] -@@ -29,11 +30,6 @@ - i128_support = [] - nightly = ["i128_support"] - std = ["libc"] --[target."cfg(target_os = \"fuchsia\")".dependencies.fuchsia-zircon] --version = "0.3.2" - [target."cfg(unix)".dependencies.libc] - version = "0.2" - optional = true --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["minwindef", "ntsecapi", "profileapi", "winnt"] diff --git a/rand-fix-metadata.diff b/rand-fix-metadata.diff new file mode 100644 index 0000000..321bd64 --- /dev/null +++ b/rand-fix-metadata.diff @@ -0,0 +1,22 @@ +--- rand-0.4.3/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ rand-0.4.3/Cargo.toml 2018-10-31T11:43:07.471112+01:00 +@@ -22,6 +22,7 @@ + categories = ["algorithms"] + license = "MIT/Apache-2.0" + repository = "https://github.com/rust-lang-nursery/rand" ++exclude = ["/utils/*", "/.travis.yml", "/appveyor.yml"] + + [features] + alloc = [] +@@ -29,11 +30,6 @@ + i128_support = [] + nightly = ["i128_support"] + std = ["libc"] +-[target."cfg(target_os = \"fuchsia\")".dependencies.fuchsia-zircon] +-version = "0.3.2" + [target."cfg(unix)".dependencies.libc] + version = "0.2" + optional = true +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["minwindef", "ntsecapi", "profileapi", "winnt"] diff --git a/rust-rand0.4.spec b/rust-rand0.4.spec index 2ccf314..b7a1dcc 100644 --- a/rust-rand0.4.spec +++ b/rust-rand0.4.spec @@ -6,7 +6,7 @@ Name: rust-%{crate}0.4 Version: 0.4.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Random number generators and other randomness functionality # Upstream license specification: MIT/Apache-2.0 @@ -14,27 +14,92 @@ License: MIT or ASL 2.0 URL: https://crates.io/crates/rand Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata -# * Exclude python utilities -Patch0: rand-0.4.2-fix-metadata.diff +# * Exclude unneeded files +Patch0: rand-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) -%description -%{summary}. +%global _description \ +Random number generators and other randomness functionality. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Random number generators and other randomness functionality. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%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}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages +which use "alloc" feature of "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+i128_support-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+i128_support-devel %{_description} + +This package contains library source intended for building other packages +which use "i128_support" feature of "%{crate}" crate. + +%files -n %{name}+i128_support-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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}/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}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -51,13 +116,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Wed Oct 31 2018 Igor Gnatenko - 0.4.3-2 +- Adapt to new packaging + * Fri Sep 07 2018 Josh Stone - 0.4.3-1 - Update to 0.4.3