On Fri, Feb 04, 2005 at 04:14:55PM +0100, Toralf Lund wrote:Yes, you said that already. What I had in mind, however, was something that would essentially cause rpmbuild to re-exec itself as "rpmbuild --target <something>" when no --target option was passed already - where "<something>" would be the value of a tag or macro, and might contain more than one target. This wouldn't break with the design, I think, or at least not more than the support for multiple targets in --target does. It may be undesirable for other reasons, though, like simplicity (or the lack thereof.)
Jeff Johnson wrote:
On Mon, Jan 31, 2005 at 02:53:08PM -0700, Bryan Stillwell wrote:So, to repeat one of my questions from elsewhere on this branch: Does that mean there is no way to ask for more than one output architecture via spec file tags or macros instead of command line options? I wouldn't want those to give multiple archs in one build, either, but rather request multiple builds from within, of you know what I mean.
Add --target arch1,arch2,arch3,arch4Is there any way to have a spec file build an rpm for two separate architectures with just the `rpmbuild -bb` command?
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
Any ideas on how to make this happen?
Note that these are sequential builds, not multiple arches in one build.
The design goal in rpm is One value of arch is static throughout a build.
Yes, no way, by design:
Only one static arch value per build.
Loop on the build, either external to rpmbuild, or with --targetI may be on the wrong track here, though. What I really want to do, is to add different archs to different %packages built from the same spec file. That's also in some ways in conflict with the design goal stated above, but I really only want one architecture *for the build* - I just happen to know that some of the packages aren't really affected by the build architecture at all (e.g. because they contain plain-text files only), or their architecture may be "reduced" to a more basic version, like i386 when building for i686 (because some or the files output by an i686 build will actually be compatible with all i386 variants.)
if you must. External loop is perhaps more flexibly configured
than the internal --target loop.