diff --git a/html2text-fix-metadata.diff b/html2text-fix-metadata.diff new file mode 100644 index 0000000..0ccfd46 --- /dev/null +++ b/html2text-fix-metadata.diff @@ -0,0 +1,32 @@ +--- html2text-0.6.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ html2text-0.6.0/Cargo.toml 2024-10-04T12:37:51.783311+00:00 +@@ -25,14 +25,6 @@ + license = "MIT" + repository = "https://github.com/jugglerchris/rust-html2text/" + +-[[example]] +-name = "html2term" +-path = "examples/html2term.rs" +- +-[[example]] +-name = "html2text" +-path = "examples/html2text.rs" +- + [dependencies.backtrace] + version = "0.3" + optional = true +@@ -52,14 +44,8 @@ + [dependencies.xml5ever] + version = "0.17" + +-[dev-dependencies.argparse] +-version = "0.2.2" +- + [features] + ansi_colours = [] + default = [] + html_trace = [] + html_trace_bt = ["backtrace"] +- +-[target."cfg(unix)".dev-dependencies.termion] +-version = "1.5" diff --git a/rust-html2text.spec b/rust-html2text.spec index a1b3e0e..b2a6a73 100644 --- a/rust-html2text.spec +++ b/rust-html2text.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -12,6 +12,9 @@ Summary: Render HTML as plain text License: MIT URL: https://crates.io/crates/html2text Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop example-only argparse and termion v1 dev-dependencies +Patch: html2text-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 @@ -98,6 +101,8 @@ use the "html_trace_bt" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# drop unused example programs that pull in outdated dependencies +rm -rv examples/ %generate_buildrequires %cargo_generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..5968014 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,11 @@ +[package] +cargo-toml-patch-comments = [ + "drop example-only argparse and termion v1 dev-dependencies", +] + +[scripts] +prep.post = [ + "# drop unused example programs that pull in outdated dependencies", + "rm -rv examples/", +] +