Use rust2rpm 26 features to reduce the amount of manual packaging work

epel10
Benjamin A. Beasley 11 months ago
parent 04ef267d48
commit e6f25adbb6

@ -1,5 +1,5 @@
--- libdeflate-sys-1.19.3/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libdeflate-sys-1.19.3/Cargo.toml 2024-02-28T16:35:41.917707+00:00
+++ libdeflate-sys-1.19.3/Cargo.toml 2024-03-10T21:27:12.731439+00:00
@@ -40,8 +40,7 @@
[build-dependencies.pkg-config]

@ -1,4 +1,4 @@
# Generated by rust2rpm 25
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
@ -13,19 +13,17 @@ License: Apache-2.0
URL: https://crates.io/crates/libdeflate-sys
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# - Make the dependency on crate(pkg-config) non-optional instead of
# associating it with the “dynamic” feature, since we patch the crate to
# always link dynamically with the system libdeflate, regardless of the
# selected features.
# * Make the dependency on crate(pkg-config) non-optional instead of associating
# it with the “dynamic” feature, since we patch the crate to always link
# dynamically with the system libdeflate, regardless of the selected features.
Patch: libdeflate-sys-fix-metadata.diff
# Downstream-only: always link dynamically with the system libdeflate,
# regardless of the selected features, and do not pin an exact version of
# libdeflate.
#
# Together with libdeflate-sys-fix-metadata.diff, this effectively reverts:
# Dynamic Linking Constraints
# https://github.com/adamkewley/libdeflater/pull/32
Patch: libdeflate-sys-1.19.3-unconditional-pkg-config.patch
# # * Downstream-only: always link dynamically with the system libdeflate,
# # regardless of the selected features, and do not pin an exact version of
# # libdeflate. Together with libdeflate-sys-fix-metadata.diff, this effectively
# # reverts:
# # * Dynamic Linking Constraints
# # * https://github.com/adamkewley/libdeflater/pull/32
Patch10: libdeflate-sys-1.19.3-unconditional-pkg-config.patch
BuildRequires: cargo-rpm-macros >= 24

@ -5,3 +5,23 @@ build = [
lib = [
"pkgconfig(libdeflate)"
]
[package]
cargo-toml-patch-comments = [
"Make the dependency on crate(pkg-config) non-optional instead of associating it with the “dynamic” feature, since we patch the crate to always link dynamically with the system libdeflate, regardless of the selected features.",
]
[[package.extra-patches]]
number = 10
file = "libdeflate-sys-1.19.3-unconditional-pkg-config.patch"
comments = [
"Downstream-only: always link dynamically with the system libdeflate, regardless of the selected features, and do not pin an exact version of libdeflate. Together with libdeflate-sys-fix-metadata.diff, this effectively reverts:",
"Dynamic Linking Constraints",
"https://github.com/adamkewley/libdeflater/pull/32"
]
[scripts.prep]
pre = [
"# Remove the bundled copy of libdeflate.",
"rm -rv libdeflate",
]

Loading…
Cancel
Save