You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.8 KiB
51 lines
1.8 KiB
From c5bab762f56bf07cd0f4a2e2d58b7c295cddedd8 Mon Sep 17 00:00:00 2001
|
|
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
Date: Tue, 20 Feb 2018 22:04:35 +0100
|
|
Subject: [PATCH 3/3] macros: pass %__cargo_common_opts to %cargo_install
|
|
|
|
Reason this has not been done before is that cargo-install doesn't
|
|
understand --release. Let's just add it to other commands and be done
|
|
with it.
|
|
|
|
Reported-by: Josh Stone <jistone@redhat.com>
|
|
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
---
|
|
data/macros.cargo | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/data/macros.cargo b/data/macros.cargo
|
|
index 67b1950..22721e9 100644
|
|
--- a/data/macros.cargo
|
|
+++ b/data/macros.cargo
|
|
@@ -1,5 +1,5 @@
|
|
%__cargo %{_bindir}/cargo
|
|
-%__cargo_common_opts --release %{?_smp_mflags}
|
|
+%__cargo_common_opts %{?_smp_mflags}
|
|
%__cargo_inspector %{_bindir}/cargo-inspector
|
|
|
|
%cargo_registry %{_datadir}/cargo/registry
|
|
@@ -35,9 +35,9 @@ EOF\
|
|
%endif \
|
|
)
|
|
|
|
-%cargo_build %__cargo build %{__cargo_common_opts}
|
|
+%cargo_build %__cargo build --release %{__cargo_common_opts}
|
|
|
|
-%cargo_test %__cargo test %{__cargo_common_opts} --no-fail-fast
|
|
+%cargo_test %__cargo test --release %{__cargo_common_opts} --no-fail-fast
|
|
|
|
%cargo_install (\
|
|
set -eu \
|
|
@@ -53,7 +53,7 @@ if %__cargo_is_lib; then \
|
|
echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \
|
|
fi \
|
|
if %__cargo_is_bin; then \
|
|
- %__cargo install %{?_smp_mflags} --path . --root %{buildroot}%{_prefix} \
|
|
+ %__cargo install %{__cargo_common_opts} --path . --root %{buildroot}%{_prefix} \
|
|
%{__rm} %{buildroot}%{_prefix}/.crates.toml \
|
|
fi \
|
|
)
|
|
--
|
|
2.16.2
|
|
|