diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..35df68d --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,46 @@ +[features] +hide = [ + # For wasm/browser targets only; rust2rpm already patches everything out of + # this feature automatically. + "js", + # We do not want to package jiff-tzdb (which bundles the timezone + # database), and we think Fedora should always be using the system tz + # database, not a bundled one. + "tzdb-bundle-always", +] +enable = [ + # Required for some doctests + "serde", +] + +[package] +cargo-toml-patch-comments = [ + """\ + Allow chrono-tz 0.8.x; this is just for doctests anyway. \ + https://bugzilla.redhat.com/show_bug.cgi?id=2273630\ + """, + # This would be a candidate for automated patching with tomcli if it were + # an unconditional dependency, but given it is + # target.'cfg(not(target_family = "wasm"))', manual patching is easier. + "Drop dev-dependency hifitime: not packaged, and only for doctests", +] + +[[package.extra-patches]] +number = 10 +file = "0001-Downstream-only-Omit-doctests-that-require-hifitime.patch" +comments = [ + """\ + Downstream-only: Omit doctests that require hifitime. \ + It is not worth packaging it solely for a couple of tiny examples.\ + """, +] +[requires] +build = [ + "tomcli", +] + +[scripts.prep] +post = [ + "# Exclude test and debug scripts that would BuildRequire sh or bash", + "tomcli set Cargo.toml append package.exclude test test-wasm 'scripts/*'", +]