From 4a36299a562f07be9868f33243666d95408f434b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 02:20:40 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-tempfile.spec | 51 +++++++++++++++++++++----------- tempfile-3.0.3-fix-metadata.diff | 13 -------- tempfile-fix-metadata.diff | 21 +++++++++++++ 3 files changed, 54 insertions(+), 31 deletions(-) delete mode 100644 tempfile-3.0.3-fix-metadata.diff create mode 100644 tempfile-fix-metadata.diff diff --git a/rust-tempfile.spec b/rust-tempfile.spec index dbbad24..15ad2fb 100644 --- a/rust-tempfile.spec +++ b/rust-tempfile.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 3.0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for managing temporary files and directories # Upstream license specification: MIT/Apache-2.0 @@ -16,29 +16,47 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # Initial patched metadata # * No Windows # * No Redox -Patch0: tempfile-3.0.3-fix-metadata.diff +# * Exclude CI files, https://github.com/Stebalien/tempfile/pull/72 +Patch0: tempfile-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(cfg-if) >= 0.1.0 with crate(cfg-if) < 0.2.0) -BuildRequires: (crate(libc) >= 0.2.27 with crate(libc) < 0.3.0) -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) -BuildRequires: (crate(remove_dir_all) >= 0.5.0 with crate(remove_dir_all) < 0.6.0) +BuildRequires: (crate(cfg-if/default) >= 0.1.0 with crate(cfg-if/default) < 0.2.0) +BuildRequires: (crate(libc/default) >= 0.2.27 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) +BuildRequires: (crate(remove_dir_all/default) >= 0.5.0 with crate(remove_dir_all/default) < 0.6.0) -%description -%{summary}. +%global _description \ +A library for managing temporary files and directories. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A library for managing temporary files and directories. +%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 NEWS +%{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 %prep %autosetup -n %{crate}-%{version} -p1 @@ -55,13 +73,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md NEWS -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 3.0.4-2 +- Adapt to new packaging + * Thu Sep 20 2018 Josh Stone - 3.0.4-1 - Update to 3.0.4 diff --git a/tempfile-3.0.3-fix-metadata.diff b/tempfile-3.0.3-fix-metadata.diff deleted file mode 100644 index d44175e..0000000 --- a/tempfile-3.0.3-fix-metadata.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- tempfile-3.0.3/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ tempfile-3.0.3/Cargo.toml 2018-07-18T08:31:08.773813+02:00 -@@ -25,10 +25,5 @@ - - [dependencies.remove_dir_all] - version = "0.5" --[target."cfg(target_os = \"redox\")".dependencies.redox_syscall] --version = "0.1" - [target."cfg(unix)".dependencies.libc] - version = "0.2.27" --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["fileapi", "winbase", "handleapi"] diff --git a/tempfile-fix-metadata.diff b/tempfile-fix-metadata.diff new file mode 100644 index 0000000..761848e --- /dev/null +++ b/tempfile-fix-metadata.diff @@ -0,0 +1,21 @@ +--- tempfile-3.0.4/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ tempfile-3.0.4/Cargo.toml 2018-10-27T02:22:15.427394+02:00 +@@ -20,6 +20,7 @@ + keywords = ["tempfile", "tmpfile", "filesystem"] + license = "MIT/Apache-2.0" + repository = "https://github.com/Stebalien/tempfile" ++exclude = ["/.travis.yml", "/appveyor.yml"] + [dependencies.cfg-if] + version = "0.1" + +@@ -28,10 +29,5 @@ + + [dependencies.remove_dir_all] + version = "0.5" +-[target."cfg(target_os = \"redox\")".dependencies.redox_syscall] +-version = "0.1" + [target."cfg(unix)".dependencies.libc] + version = "0.2.27" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["fileapi", "winbase", "handleapi"]