[projects/template-specs] use %cargo_* macros
Jan Palus
atler at pld-linux.org
Wed Mar 31 11:30:07 CEST 2021
On 30.03.2021 20:57, Jakub Bogusz wrote:
> On Tue, Mar 30, 2021 at 06:46:46PM +0300, Elan Ruusamäe wrote:
> [...]
> > >@@ -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?
>
> I'd enhance %cargo_build at least by adding x32 --target option.
Good point, thanks. I didn't realize rustc on x32 does not compile to
x32 by default. Added in 2.004.
More information about the pld-devel-en
mailing list