[packages/rust] respect configured number of parallel jobs
atler
atler at pld-linux.org
Fri May 1 18:28:42 CEST 2020
commit 3776565685b87ac33d6fda560db25996cdef1899
Author: Jan Palus <atler at pld-linux.org>
Date: Fri May 1 13:12:25 2020 +0200
respect configured number of parallel jobs
rust.spec | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/rust.spec b/rust.spec
index b1f2e7d..0b39917 100644
--- a/rust.spec
+++ b/rust.spec
@@ -102,6 +102,14 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautoreqfiles lib.*-[[:xdigit:]]{8}[.]so.*
%define _noautoprovfiles lib.*-[[:xdigit:]]{8}[.]so.*
+%define x_py { \
+ x_py() { \
+ local cmd="$1"; \
+ shift; \
+ %{?__jobs:CARGO_BUILD_JOBS=%__jobs }./x.py "$cmd" %{?__jobs:-j %__jobs} "$@"; \
+ }; x_py }
+
+
%description
Rust is a systems programming language that runs blazingly fast,
prevents segfaults, and guarantees thread safety.
@@ -289,16 +297,17 @@ find vendor -name .cargo-checksum.json \
--llvm-root=%{_prefix} \
--release-channel=%{channel}
-RUST_BACKTRACE=full \
-./x.py dist --verbose
+export RUST_BACKTRACE=full
+%x_py dist --verbose
-%{?with_tests:./x.py test}
+%{?with_tests:%x_py test}
%install
rm -rf $RPM_BUILD_ROOT
-DESTDIR=$RPM_BUILD_ROOT ./x.py install
-DESTDIR=$RPM_BUILD_ROOT ./x.py install src
+export DESTDIR=$RPM_BUILD_ROOT
+%x_py install
+%x_py install src
# Make sure the shared libraries are in the proper libdir
%if "%{_libdir}" != "%{common_libdir}"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rust.git/commitdiff/c160f211f6a33dcfc6d37f8717b868514b167e43
More information about the pld-cvs-commit
mailing list