From 258b6f9526a47c4e25333b009efa1fe41ed90295 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 9 Oct 2023 15:34:47 +0200 Subject: [PATCH] templates: do not generate devel subpackages when using a vendor tarball --- rust2rpm/templates/crate.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rust2rpm/templates/crate.spec b/rust2rpm/templates/crate.spec index ecb69c7..76e4c79 100644 --- a/rust2rpm/templates/crate.spec +++ b/rust2rpm/templates/crate.spec @@ -14,6 +14,11 @@ %global debug_package %{nil} {% endif %} +{% if use_vendor_tarball %} +# prevent library files from being installed +%global __cargo_is_lib() 0 + +{% endif %} %global crate {{ crate_name }} {% if crate_version != rpm_version %} %global crate_version {{ crate_version }} @@ -144,7 +149,7 @@ Requires: {{ req }} {% endif -%} -{% if rpm_library_package %} +{% if rpm_library_package and not use_vendor_tarball %} {% for feature in crate_features %} {% if feature is none %} {% set pkg = " devel" %}