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

Re: multiple arch sub packages?



On Mon, May 06, 2002 at 01:50:32PM +0200, Matthias Saou wrote:
> Once upon a time, Rui wrote :
>>   I have a set of packages and subpackages being built on an ix86
>> machine, but one of the packages could very well be noarch.
> 
> Simply use :
> 
> BuildArch: noarch
> 
> in your spec file, and that's it :-)

I don't think that's it :-(.  I have a similar problem; in fact, I think
it's the same one Rui's talking about.  I produce x86 builds, and I want
the main package to be for x86 and the subpackage to be noarch.

For example, my package "pose" has a subpackage "pose-perl".  The
"pose" package contains binary executables, so has to be i386, but the
subpackage contains only text Perl scripts, so would like to be noarch.
Another is my "prc-tools" package, which has binary executables, and its
"prc-tools-htmldocs" subpackage, which contains only text documentation,
so would like to be noarch.

It seems like the thing to do would be to put "BuildArch: noarch" in the
subpackage part of the .spec file.  But sadly that BuildArch affects
*all* of the packages in the .spec file: "pose" and "prc-tools" end up
as noarch as well, which is wrong.  This is in contrast to putting a
Prefix: tag in the subpackage part, which affects only the subpackage as
I'd hoped.

This is with rpm 4.0.3 as distributed with Red Hat 7.2.

At the moment I'm using the following rather sucky workaround:

* wrap most of the main package's %build and %files in "%ifnarch noarch",
  so I can do a noarch build without wasting 30 minutes building stuff
  I'm going to throw away

* build twice:
	rpmbuild -ba pose.spec
	rpmbuild -bb --target noarch pose.spec

* throw away pose.noarch.rpm and pose-perl.i386.rpm

(The motivation, of course, is that one day I might distribute, say,
SPARC builds too.  I'd like to distribute just pose.i386.rpm,
pose.sparc.rpm, and pose-perl.noarch.rpm, rather than pointlessly
duplicating two builds of the pose-perl package.)

    John





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