]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/blobdiff - macros.rust
- merged 2.030 from PLD, re-enabled PHP dependency generators
[packages/rpm-tld-macros.git] / macros.rust
index 3f61146aad9d1ae17ee44450c5cd5bdea1174e47..7996c4fa934a030f9f550cd4bbd4443524b17082 100644 (file)
@@ -1,8 +1,8 @@
-%debuginforustflags    -C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
+%debuginforustflags    -C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}} -C strip=none
 %rpmrustflags  %debuginforustflags
 %rust_arches   %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
 
-%cargo_target  \\\
+%rust_target   \\\
 %ifarch i586\
 i586-unknown-linux-gnu\\\
 %endif\
@@ -29,9 +29,11 @@ thumbv7neon-unknown-linux-gnueabihf\\\
 %endif\
 %{nil}
 
+%cargo_target  %rust_target
 %cargo_targetdir       target
-%cargo_objdir          %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{cargo_target}/%{!?debug:release}%{?debug:debug}
+%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 \\\
@@ -41,10 +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 %{cargo_target} \\\
+       --target %rust_target \\\
        --target-dir %{cargo_targetdir} \\\
 %{nil}
 
@@ -55,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 %{cargo_target} \\\
+       --target %rust_target \\\
        --target-dir %{cargo_targetdir} \\\
 %{nil}