I'm trying to address https://pagure.io/fedora-rust/rust-packaging/issue/22.
This PR add two new macros to allow modifying the default behaviour of the %cargo_install macro:
%cargo_install_lib 1
%cargo_install_bin 1
Setting the first macro to 0 prevents installation of crate sources to %{crate_instdir} even if the crate provides a [lib] interface. Setting the second macro to 0 prevents installation of executables even of the crate defines any [[bin]] targets explicitly or implicitly.
This should address two use cases that are currently not correctly supported:
Disable installation of binaries that need to be built but should not be installed (for example, binaries that are required for running tests).
Disable installation of library sources in packages that are not Rust crates / published on crates.io.
Support for setting both macros will be added to rust2rpm separately once this lands in cargo-rpm-macros.
I'm trying to address https://pagure.io/fedora-rust/rust-packaging/issue/22.
This PR add two new macros to allow modifying the default behaviour of the
%cargo_installmacro:%cargo_install_lib 1%cargo_install_bin 1Setting the first macro to
0prevents installation of crate sources to%{crate_instdir}even if the crate provides a[lib]interface. Setting the second macro to0prevents installation of executables even of the crate defines any[[bin]]targets explicitly or implicitly.This should address two use cases that are currently not correctly supported:
Support for setting both macros will be added to rust2rpm separately once this lands in cargo-rpm-macros.