diff --git a/data/macros.cargo b/data/macros.cargo index c951418..ebf3edb 100644 --- a/data/macros.cargo +++ b/data/macros.cargo @@ -4,7 +4,7 @@ %cargo_registry %{_datadir}/cargo/registry -%__cargo_is_lib() %__cargo_inspector --target-kinds Cargo.toml | grep -q -F -x "$(printf 'lib\\\nproc-macro')" +%__cargo_is_lib() %__cargo_inspector --target-kinds Cargo.toml | grep -q -F -x "$(printf 'lib\\\nrlib\\\nproc-macro')" %__cargo_is_bin() %__cargo_inspector --target-kinds Cargo.toml | grep -q -F -x bin %cargo_prep (\ diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index fba33b3..1cc6933 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -261,7 +261,7 @@ def main(): kwargs = {} bins = [tgt for tgt in metadata.targets if tgt.kind == "bin"] - libs = [tgt for tgt in metadata.targets if tgt.kind in ("lib", "proc-macro")] + libs = [tgt for tgt in metadata.targets if tgt.kind in ("lib", "rlib", "proc-macro")] is_bin = len(bins) > 0 is_lib = len(libs) > 0 if is_bin: