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

epel10
Benjamin A. Beasley 11 months ago
parent aa41d3dbd1
commit b207e90249

@ -1,7 +1,10 @@
# Generated by rust2rpm 25
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
# prevent executables from being installed
%global cargo_install_bin 0
%global crate zopfli
Name: rust-zopfli
@ -13,14 +16,11 @@ License: Apache-2.0
URL: https://crates.io/crates/zopfli
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
#
# - Dont build the “zopfli” executable, which would conflict with the more
# widely used one provided by https://src.fedoraproject.org/rpms/zopfli.
# - Exclude more files from the published crate
# * Exclude more files from the published crate:
# https://github.com/zopfli-rs/zopfli/pull/37
Patch: zopfli-fix-metadata.diff
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: cargo-rpm-macros >= 26
%global _description %{expand:
A Rust implementation of the Zopfli compression algorithm.}

@ -1,4 +1,12 @@
[package]
# Dont build the “zopfli” executable, which would conflict with the more
# widely used one provided by https://src.fedoraproject.org/rpms/zopfli.
cargo-install-bin = false
cargo-toml-patch-comments = [
"Exclude more files from the published crate: https://github.com/zopfli-rs/zopfli/pull/37",
]
[features]
hide = [
"nightly"
"nightly",
]

@ -1,5 +1,5 @@
--- zopfli-0.8.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zopfli-0.8.0/Cargo.toml 2024-02-08T17:20:25.311181+00:00
+++ zopfli-0.8.0/Cargo.toml 2024-03-14T15:41:14.859061+00:00
@@ -14,7 +14,12 @@
rust-version = "1.66"
name = "zopfli"
@ -14,25 +14,3 @@
description = "A Rust implementation of the Zopfli compression algorithm."
homepage = "https://github.com/zopfli-rs/zopfli"
readme = "README.md"
@@ -25,20 +30,13 @@
]
license = "Apache-2.0"
repository = "https://github.com/zopfli-rs/zopfli"
+autobins = false
[package.metadata.docs.rs]
cargo-args = ["--all-features"]
[profile.release]
debug = 2
-
-[[bin]]
-name = "zopfli"
-required-features = [
- "std",
- "gzip",
- "zlib",
-]
[dependencies.crc32fast]
version = "1.3.2"

Loading…
Cancel
Save