From 9562eabac0331fdcde092fd1ef04aa975b89cd22 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 15 Sep 2024 12:24:16 -0400 Subject: [PATCH] Drop benchmark-only dev-dependency on bencher --- rust-lebe.spec | 14 ++++++++------ rust2rpm.toml | 10 ++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 rust2rpm.toml diff --git a/rust-lebe.spec b/rust-lebe.spec index b8e4776..995f83b 100644 --- a/rust-lebe.spec +++ b/rust-lebe.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 22 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -13,12 +13,12 @@ License: BSD-3-Clause URL: https://crates.io/crates/lebe Source: %{crates_source} -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: tomcli %global _description %{expand: -Tiny, dead simple, high performance endianness conversions with a generic API.} +Tiny, dead simple, high performance endianness conversions with a +generic API.} %description %{_description} @@ -49,8 +49,10 @@ use the "default" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep +# Do not depend on bencher; it is needed only for benchmarks. +tomcli set Cargo.toml del dev-dependencies.bencher %generate_buildrequires %cargo_generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..45f5b9c --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,10 @@ +[requires] +build = [ + "tomcli", +] + +[scripts.prep] +post = [ + "# Do not depend on bencher; it is needed only for benchmarks.", + "tomcli set Cargo.toml del dev-dependencies.bencher", +]