X-Git-Url: https://git.tld-linux.org/?p=packages%2Frpm-tld-macros.git;a=blobdiff_plain;f=macros.rust;fp=macros.rust;h=7996c4fa934a030f9f550cd4bbd4443524b17082;hp=51f8fe46b51b2555aabe31aaee31ed2533943065;hb=d7c2caf96bbc6c74864020df9db6d759089a17b1;hpb=cf003b2dfbe72b28f3fb8108f24290b760365f24 diff --git a/macros.rust b/macros.rust index 51f8fe4..7996c4f 100644 --- a/macros.rust +++ b/macros.rust @@ -33,6 +33,7 @@ thumbv7neon-unknown-linux-gnueabihf\\\ %cargo_targetdir target %cargo_objdir %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{rust_target}/%{!?debug:release}%{?debug:debug} +%__rustc /usr/bin/rustc %__cargo /usr/bin/cargo %__cargo_common_opts -v --offline %cargo_build \\\ @@ -42,11 +43,12 @@ thumbv7neon-unknown-linux-gnueabihf\\\ CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \\\ LDFLAGS="%{rpmldflags}" \\\ PKG_CONFIG_ALLOW_CROSS=1 \\\ + RUSTC="${RUSTC:-%__rustc}" \\\ %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"} \\\ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\ %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\ %{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\ - --target %{rust_target} \\\ + --target %rust_target \\\ --target-dir %{cargo_targetdir} \\\ %{nil} @@ -57,9 +59,11 @@ thumbv7neon-unknown-linux-gnueabihf\\\ CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \\\ LDFLAGS="%{rpmldflags}" \\\ PKG_CONFIG_ALLOW_CROSS=1 \\\ + RUSTC="${RUSTC:-%__rustc}" \\\ + %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"} \\\ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\ %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\ %{__cargo} %{__cargo_common_opts} install \\\ - --target %{rust_target} \\\ + --target %rust_target \\\ --target-dir %{cargo_targetdir} \\\ %{nil}