You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-jiff/rust2rpm.toml

95 lines
2.8 KiB

[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 = [
# 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",
"""\
Drop dev-dependency serde_yml: not packaged; we have patched out the tests \
that require it\
""",
]
[[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.\
""",
]
[[package.extra-patches]]
number = 11
file = "0001-Downstream-only-Omit-doctests-that-require-icu.patch"
comments = [
"""\
Downstream-only: Omit doctests that require icu.\
""",
]
[[package.extra-patches]]
number = 12
file = "0001-Downstream-only-omit-tests-that-require-serde_yml.patch"
comments = [
"""\
Downstream-only: Omit tests that require serde_yml.\
""",
]
[[package.extra-patches]]
number = 1009
file = "0001-EPEL9-Ignore-doctests-that-require-very-recent-Rust-.patch"
comments = [
"EPEL9: Ignore doctests that require very recent Rust compilers",
"""\
In this crate, doctests and examples (but not the lib and integration tests) \
are allowed to use Rust features from versions newer than the MSRV. Its \
therefore necessary to ignore some of them on EPEL9. If this patch becomes too \
unwieldy, we could choose to start skipping doctests and/or examples there \
entirely.\
""",
]
[requires]
build = [
"tomcli",
]
[scripts.prep]
pre = [
"# NOTE: The -p1 in %%autosetup, above, must be replaced with -N so that we can",
"# do conditional patching, below.",
"%autopatch -M 999 -p1",
"# We reserved patch number 1000+<N> for EPEL<N>.",
"%if 0%{?el9}",
# EPEL9 rpm does not support "%patch <N>", and would quietly attempt and
# fail to re-apply Patch0 instead of applying the desired patch. We *need*
# to use "%patch -P <N>" instead.
"%patch -P 1009 -p1",
"%endif",
"# We do not yet have a rust-icu package (although one would be desirable)",
"tomcli set Cargo.toml del dev-dependencies.icu",
]
post = [
"# Exclude test and debug scripts that would BuildRequire sh or bash",
"tomcli set Cargo.toml append package.exclude test test-wasm 'scripts/*'",
]