Re: [projects/template-specs] use %cargo_* macros

2021-03-30 Thread Jakub Bogusz
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.

When it comes to crates, It'd better to find some generic solution for
packaging creates system-wide instead of vendoring everything
everywhere. I'm aware Fedora has some, but I didn't have enough time to
do a research.


-- 
Jakub Boguszhttp://qboosh.pl/
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [projects/template-specs] use %cargo_* macros

2021-03-30 Thread Elan Ruusamäe



On 30.03.2021 14:26, atler wrote:

commit f329c346f35622a09475262bb712ae52aed03f4a
Author: Jan Palus 
Date:   Tue Mar 30 13:25:20 2021 +0200

 use %cargo_* macros

  rust.spec | 7 +++
  1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/rust.spec b/rust.spec
index 3e3e272..d792e2c 100644
--- a/rust.spec
+++ b/rust.spec
@@ -14,6 +14,7 @@ Source1:  %{name}-crates-%{version}.tar.xz
  # Source1-md5:-
  URL:  -
  BuildRequires:cargo
+BuildRequires: rpmbuild(macros) >= 2.003
  BuildRequires:rust
  BuildRequires:tar >= 1:1.22
  BuildRequires:xz
@@ -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?




___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/rpm-pld-macros] initial basic rust/cargo macros (2.003)

2021-03-30 Thread Elan Ruusamäe

On 30.03.2021 14:06, atler wrote:


commit 593b448d587953c0aa5cfb8484485fda26499d3c
Author: Jan Palus 
Date:   Tue Mar 30 12:59:03 2021 +0200

 initial basic rust/cargo macros (2.003)

  macros.pld  | 17 +


perhaps place the rust/cargo macros to a separate file?


___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en