| |
@@ -49,37 +49,31 @@
|
| |
}
|
| |
|
| |
%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 \
|
| |
+ %{__cargo_inspector} -BR %{__cargo_parse_opts %{-a} %{-f:-f%{-f*}}} Cargo.toml \
|
| |
+ %if %{with check} \
|
| |
+ %{__cargo_inspector} -TR Cargo.toml \
|
| |
%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
|
| |
+ %{shrink:\
|
| |
+ %{__cargo} build \
|
| |
+ %{__cargo_common_opts} \
|
| |
+ --release \
|
| |
+ %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
| |
+ %* \
|
| |
+ }
|
| |
|
| |
%cargo_test(naf:) \
|
| |
- %if ! 0%{?__cargo_skip_build} \
|
| |
- %{shrink:\
|
| |
- %{__cargo} test \
|
| |
- %{__cargo_common_opts} \
|
| |
- --release \
|
| |
- --no-fail-fast \
|
| |
- %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
| |
- %* \
|
| |
- } \
|
| |
- %endif
|
| |
+ %{shrink:\
|
| |
+ %{__cargo} test \
|
| |
+ %{__cargo_common_opts} \
|
| |
+ --release \
|
| |
+ --no-fail-fast \
|
| |
+ %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
| |
+ %* \
|
| |
+ }
|
| |
|
| |
- %cargo_install(t:naf:) (\
|
| |
+ %cargo_install(t:naf:) ( \
|
| |
set -eu \
|
| |
if %__cargo_is_lib; then \
|
| |
CRATE_NAME=$(%__cargo_inspector --name Cargo.toml) \
|
| |
@@ -95,19 +89,17 @@
|
| |
%{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \
|
| |
%{__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 \
|
| |
- %{__cargo_common_opts} \
|
| |
- --no-track \
|
| |
- --path . \
|
| |
- %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
| |
- %* \
|
| |
- } \
|
| |
- fi \
|
| |
- %endif \
|
| |
+ fi \
|
| |
+ if %__cargo_is_bin; then \
|
| |
+ %{shrink: \
|
| |
+ %{__cargo} install \
|
| |
+ %{__cargo_common_opts} \
|
| |
+ --no-track \
|
| |
+ --path . \
|
| |
+ %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
|
| |
+ %* \
|
| |
+ } \
|
| |
+ fi \
|
| |
)
|
| |
|
| |
%__cargo_feature_from_name(n:) %{lua:
|
| |
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.