Re: Multi-arch RPM at once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 Jan 2005 14:53:08 -0700, Bryan Stillwell <bryans@xxxxxxxxxx> wrote:
> Is there any way to have a spec file build an rpm for two separate
> architectures with just the `rpmbuild -bb` command?
>
Not with one invocation of the rpmbuild command.  A single invocation
will always yield a single arch.
 
> As an example, if I had a helloworld program written in C, and wanted it
> to build on x86_64 on i386, how would I do that?
> 
> I figure in the build section I would have to build it twice with these
> two commands:
> 
>   x86_64: gcc helloworld.c -o bin64/helloworld
>   i386:   gcc -m32 helloworld.c -o bin32/helloworld
> 
> What I'm imagining is the build would take place, then the final lines
> would look like:
> 
> Wrote: /home/build/rpm/RPMS/x86_64/helloworld-1.0-1.x86_64.rpm
> Wrote: /home/build/rpm/RPMS/i386/helloworld-1.0-1.i386.rpm
> Wrote: /home/build/rpm/RPMS/noarch/helloworld-docs-1.0-1.noarch.rpm
>
One example is the kernel SRPM.  But note it does this across multiple
invocations of rpmbuild.  The basic strategy is to use %ifarch and %if
to do conditinal builds.  In /usr/share/doc/rpm* you will find a
document called conditionalbuilds.  Read this.  Also, as I said check
out the spec file for the redhat kernel.

Cheers...james 
> Any ideas on how to make this happen?
> 
> Bryan
> 
> --
> Aspen Systems, Inc.    | http://www.aspsys.com/
> Production Engineer    | Phone: (303)431-4606
> bryans@xxxxxxxxxx      | Fax:   (303)431-7196
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list
>

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux