]> git.pld-linux.org Git - packages/rpm-pld-macros.git/blob - macros.rust
allow cross compilation in pkg_config crate on x32; rel 2
[packages/rpm-pld-macros.git] / macros.rust
1 %debuginforustflags     -C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
2 %rpmrustflags   %debuginforustflags
3 %rust_arches    %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
4
5 %__cargo        /usr/bin/cargo
6 %__cargo_common_opts    -v --offline
7 %cargo_build \\\
8 %ifarch x32 \
9         PKG_CONFIG_ALLOW_CROSS=1 \\\
10 %endif \
11         RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
12         %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
13         %{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\
14 %ifarch x32 \
15         --target x86_64-unknown-linux-gnux32 \\\
16 %endif \
17 %{nil}
18
19 %cargo_install \\\
20 %ifarch x32 \
21         PKG_CONFIG_ALLOW_CROSS=1 \\\
22 %endif \
23         RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
24         %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
25         %{__cargo} %{__cargo_common_opts} install \\\
26 %ifarch x32 \
27         --target x86_64-unknown-linux-gnux32 \\\
28 %endif \
29 %{nil}
This page took 0.024947 seconds and 4 git commands to generate.