Drop __cargo_skip_build logic
It looks like this logic was only used for module builds, which is not how Rust packages have been built for a few Fedora releases now. Fixes #142.
This commit is contained in:
parent
ea59cb27d1
commit
1482f79e28
2 changed files with 30 additions and 48 deletions
|
@ -49,26 +49,21 @@ EOF\
|
|||
}
|
||||
|
||||
%cargo_generate_buildrequires(af:) \
|
||||
%if ! 0%{?__cargo_skip_build} \
|
||||
%{__cargo_inspector} -BR %{__cargo_parse_opts %{-a} %{-f:-f%{-f*}}} Cargo.toml \
|
||||
%if %{with check} \
|
||||
%{__cargo_inspector} -TR Cargo.toml \
|
||||
%endif \
|
||||
%endif
|
||||
|
||||
%cargo_build(naf:) \
|
||||
%if ! 0%{?__cargo_skip_build} \
|
||||
%{shrink:\
|
||||
%{__cargo} build \
|
||||
%{__cargo_common_opts} \
|
||||
--release \
|
||||
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
||||
%* \
|
||||
} \
|
||||
%endif
|
||||
}
|
||||
|
||||
%cargo_test(naf:) \
|
||||
%if ! 0%{?__cargo_skip_build} \
|
||||
%{shrink:\
|
||||
%{__cargo} test \
|
||||
%{__cargo_common_opts} \
|
||||
|
@ -76,8 +71,7 @@ EOF\
|
|||
--no-fail-fast \
|
||||
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
||||
%* \
|
||||
} \
|
||||
%endif
|
||||
}
|
||||
|
||||
%cargo_install(t:naf:) ( \
|
||||
set -eu \
|
||||
|
@ -96,7 +90,6 @@ if %__cargo_is_lib; then \
|
|||
%{__rm} -f $REG_DIR/Cargo.toml.deps \
|
||||
echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \
|
||||
fi \
|
||||
%if ! %__cargo_skip_build \
|
||||
if %__cargo_is_bin; then \
|
||||
%{shrink: \
|
||||
%{__cargo} install \
|
||||
|
@ -107,7 +100,6 @@ fi \
|
|||
%* \
|
||||
} \
|
||||
fi \
|
||||
%endif \
|
||||
)
|
||||
|
||||
%__cargo_feature_from_name(n:) %{lua:
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
%global debug_package %{nil}
|
||||
{% elif not include_devel %}
|
||||
{% set only_main = True %}
|
||||
%global __cargo_skip_build 0
|
||||
{% endif %}
|
||||
|
||||
%global crate {{ md.name }}
|
||||
|
@ -43,11 +42,6 @@ Patch0: {{ patch_file }}
|
|||
{% endif %}
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
{% if not only_main %}
|
||||
%if %{__cargo_skip_build}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
{% endif %}
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
{% if all_features %}
|
||||
|
@ -62,7 +56,6 @@ BuildRequires: rust-packaging
|
|||
{% set testrequires = normalize_deps(md.dev_dependencies)|sort %}
|
||||
{% set has_buildrequires = (buildrequires + testrequires)|length > 0 %}
|
||||
{% if has_buildrequires and not only_main %}
|
||||
%if ! %{__cargo_skip_build}
|
||||
{% endif %}
|
||||
{% for req in buildrequires %}
|
||||
BuildRequires: {{ req }}
|
||||
|
@ -78,7 +71,6 @@ BuildRequires: {{ req }}
|
|||
BuildRequires: {{ req }}
|
||||
{% endfor %}
|
||||
{% if has_buildrequires and not only_main %}
|
||||
%endif
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -94,7 +86,6 @@ BuildRequires: {{ req }}
|
|||
|
||||
{% if include_main %}
|
||||
{% if not only_main %}
|
||||
%if ! %{__cargo_skip_build}
|
||||
{% endif %}
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
|
@ -118,7 +109,6 @@ Requires: {{ req }}
|
|||
%{_bindir}/{{ bin.name }}
|
||||
{% endfor %}
|
||||
{% if not only_main %}
|
||||
%endif
|
||||
{% endif %}
|
||||
|
||||
{% endif -%}
|
||||
|
|
Loading…
Reference in a new issue