From 061c92a507060be0ec80705827ee1f53a2de78c4 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 20 Mar 2023 18:47:18 +0100 Subject: [PATCH] Regenerate with rust2rpm v24 --- README.md | 3 -- heapsize-fix-metadata-auto.diff | 9 +++++ heapsize-fix-metadata.diff | 10 ++--- rust-heapsize.spec | 70 ++++++++++++++++++++------------- 4 files changed, 55 insertions(+), 37 deletions(-) delete mode 100644 README.md create mode 100644 heapsize-fix-metadata-auto.diff diff --git a/README.md b/README.md deleted file mode 100644 index fbe0824..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-heapsize - -The rust-heapsize package \ No newline at end of file diff --git a/heapsize-fix-metadata-auto.diff b/heapsize-fix-metadata-auto.diff new file mode 100644 index 0000000..5dded5b --- /dev/null +++ b/heapsize-fix-metadata-auto.diff @@ -0,0 +1,9 @@ +--- heapsize-0.4.2/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ heapsize-0.4.2/Cargo.toml 2023-03-20T17:45:39.243567+00:00 +@@ -22,6 +22,3 @@ + [features] + flexible-tests = [] + unstable = [] +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.4" +-features = ["std", "heapapi"] diff --git a/heapsize-fix-metadata.diff b/heapsize-fix-metadata.diff index 8d49f83..518e701 100644 --- a/heapsize-fix-metadata.diff +++ b/heapsize-fix-metadata.diff @@ -1,6 +1,6 @@ ---- heapsize-0.4.2/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ heapsize-0.4.2/Cargo.toml 2018-10-27T12:35:25.915875+02:00 -@@ -18,10 +18,8 @@ +--- heapsize-0.4.2/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ heapsize-0.4.2/Cargo.toml 2023-03-20T17:45:50.713960+00:00 +@@ -18,6 +18,7 @@ description = "Infrastructure for measuring the total runtime size of an object on the heap" license = "MIT/Apache-2.0" repository = "https://github.com/servo/heapsize" @@ -8,7 +8,3 @@ [features] flexible-tests = [] - unstable = [] --[target."cfg(windows)".dependencies.winapi] --version = "0.3.4" --features = ["std", "heapapi"] diff --git a/rust-heapsize.spec b/rust-heapsize.spec index 10d749b..8b3ffc4 100644 --- a/rust-heapsize.spec +++ b/rust-heapsize.spec @@ -1,30 +1,30 @@ -# Generated by rust2rpm -# * Tests are run in infrastructure -%bcond_with check +# Generated by rust2rpm 24 +%bcond_without check %global debug_package %{nil} %global crate heapsize -Name: rust-%{crate} +Name: rust-heapsize Version: 0.4.2 Release: %autorelease Summary: Infrastructure for measuring the total runtime size of an object on the heap # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/heapsize -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate -# Initial patched metadata -# * No Windows -# * Exclude CI files, https://github.com/servo/heapsize/pull/101 -Patch0: heapsize-fix-metadata.diff +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: heapsize-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * exclude CI configuration files: +# https://github.com/servo/heapsize/pull/101 +Patch: heapsize-fix-metadata.diff -ExclusiveArch: %{rust_arches} +BuildRequires: rust-packaging >= 21 -BuildRequires: rust-packaging - -%global _description \ -Infrastructure for measuring the total runtime size of an object on the heap. +%global _description %{expand: +Infrastructure for measuring the total runtime size of an object on the +heap.} %description %{_description} @@ -34,13 +34,14 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -48,11 +49,23 @@ 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. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+flexible-tests-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+flexible-tests-devel %{_description} + +This package contains library source intended for building other packages which +use the "flexible-tests" feature of the "%{crate}" crate. + +%files -n %{name}+flexible-tests-devel +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unstable-devel Summary: %{summary} @@ -60,16 +73,19 @@ BuildArch: noarch %description -n %{name}+unstable-devel %{_description} -This package contains library source intended for building other packages -which use "unstable" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "unstable" feature of the "%{crate}" crate. %files -n %{name}+unstable-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep +%generate_buildrequires +%cargo_generate_buildrequires + %build %cargo_build