On 30.03.2021 14:26, atler wrote:
commit f329c346f35622a09475262bb712ae52aed03f4a
Author: Jan Palus <at...@pld-linux.org>
Date:   Tue Mar 30 13:25:20 2021 +0200

     use %cargo_* macros

  rust.spec | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/rust.spec b/rust.spec
index 3e3e272..d792e2c 100644
--- a/rust.spec
+++ b/rust.spec
@@ -14,6 +14,7 @@ Source1:      %{name}-crates-%{version}.tar.xz
  # Source1-md5:        -
  URL:          -
  BuildRequires:        cargo
+BuildRequires: rpmbuild(macros) >= 2.003
  BuildRequires:        rust
  BuildRequires:        tar >= 1:1.22
  BuildRequires:        xz
@@ -40,19 +41,17 @@ EOF
  %build
  export CARGO_HOME="$(pwd)/.cargo"
-cargo -v build \
+%cargo_build \
  %ifarch x32
        --target x86_64-unknown-linux-gnux32 \
  %endif
-       --release \
        --frozen
%install
  rm -rf $RPM_BUILD_ROOT
  export CARGO_HOME="$(pwd)/.cargo"
-cargo -vv \
-       install \
+%cargo_install \
        --frozen \
        --path . \
        --root $RPM_BUILD_ROOT%{_prefix}


why not include the crate based build options also into common macros?


also, in template-specs/rust.spec, there's comment for source0, creating crate, maybe an universal script could be provided by macros package?



_______________________________________________
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to