From 924867bd2dfd65ac75eacddd923618867290aa75 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 5 Feb 2023 15:36:58 +0100 Subject: [PATCH] Prevent useless example binary from being installed --- rust-twox-hash.spec | 21 ++++++--------------- .rust2rpm.conf => rust2rpm.conf | 0 twox-hash-fix-metadata.diff | 10 ++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) rename .rust2rpm.conf => rust2rpm.conf (100%) create mode 100644 twox-hash-fix-metadata.diff diff --git a/rust-twox-hash.spec b/rust-twox-hash.spec index fb0ff70..d69e831 100644 --- a/rust-twox-hash.spec +++ b/rust-twox-hash.spec @@ -1,19 +1,20 @@ -# Generated by rust2rpm 21 +# Generated by rust2rpm 23 %bcond_without check +%global debug_package %{nil} %global crate twox-hash -Name: rust-%{crate} +Name: rust-twox-hash Version: 1.6.3 Release: %autorelease Summary: Rust implementation of the XXHash and XXH3 algorithms -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/twox-hash Source: %{crates_source} - -ExclusiveArch: %{rust_arches} +# Manually created patch for downstream crate metadata changes +# * prevent useless example binary from being installed +Patch: twox-hash-fix-metadata.diff BuildRequires: rust-packaging >= 21 @@ -22,16 +23,6 @@ Rust implementation of the XXHash and XXH3 algorithms.} %description %{_description} -%package -n %{crate} -Summary: %{summary} - -%description -n %{crate} %{_description} - -%files -n %{crate} -%license LICENSE.txt -%doc README.md -%{_bindir}/hash_file - %package devel Summary: %{summary} BuildArch: noarch diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 100% rename from .rust2rpm.conf rename to rust2rpm.conf diff --git a/twox-hash-fix-metadata.diff b/twox-hash-fix-metadata.diff new file mode 100644 index 0000000..e9a9917 --- /dev/null +++ b/twox-hash-fix-metadata.diff @@ -0,0 +1,10 @@ +--- twox-hash-1.6.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ twox-hash-1.6.3/Cargo.toml 2023-02-05T14:34:44.019474+00:00 +@@ -26,6 +26,7 @@ + categories = ["algorithms"] + license = "MIT" + repository = "https://github.com/shepmaster/twox-hash" ++autobins = false + + [dependencies.cfg-if] + version = ">= 0.1, < 2"