RPM and cross-compiling?
valery_reznic at yahoo.com
Thu Sep 20 11:24:46 UTC 2012
----- Original Message -----
> From: David Hagood <david.hagood at gmail.com>
> To: Valery Reznic <valery_reznic at yahoo.com>; General discussion about the RPM package manager <rpm-list at lists.rpm.org>
> Sent: Thursday, September 20, 2012 2:12 PM
> Subject: Re: RPM and cross-compiling?
> On Thu, 2012-09-20 at 00:52 -0700, Valery Reznic wrote:
>> As long as I understand you have no problem with foo-devel,
>> only with foo itself and problem is you want two different packages.
>> one for the target system, one for cross compiling.
>> All the files in those two packages are same, just should be installed
>> into different directories.
>> Is it correct?
>> Assuming that yes, I can suggest following:
>> 1. Compile you software.
>> 2. Use spec file1 with only %install stage to create package for target
>> 3. Use spec file 2 with different %install that will create package for
>> This solution will avoid compiling same files twice.
> I've considered that, but if at all possible, I'd like to do this the
> "right" way and have a source RPM for the package, to be able to
> the work product and be able to regenerate it later.
I see. What about following:
- there is one spec file.
- %prep and %build sections do whatever they do.
- %install section installed built files into two different locations.
- subpackages used to create foo-devel foo-embeded and foo-crosscomplile
> It seems to me that supporting this sort of secondary packaging would be
> a nice feature for RPM to support in the future.
More information about the Rpm-list