Announcing the Cross Compiler Framework (Win32+Win64)

Erik van Pienbroek erik at vanpienbroek.nl
Tue Jan 18 12:17:09 UTC 2011


Erik van Pienbroek schreef op zo 09-01-2011 om 13:47 [+0100]:
> Kevin Kofler schreef op vr 07-01-2011 om 04:13 [+0100]:
> > Erik van Pienbroek wrote:
> > > I agree with your point that placing all targets in a single binary RPM
> > > isn't an ideal solution. While working on this framework I thought about
> > > the possibility to split everything in per-target RPM's, but I got stuck
> > > at the filelist part. I couldn't think of a method to easily indicate
> > > that all files using %{_mingw32_...} macros have to end up in a mingw32-
> > > package.
> > > 
> > > Have you got any idea how we can overcome this without introducing a lot
> > > of duplicate instructions in the .spec files?
> <snip>
> > but I think the best solution is probably to use %files -f. Then you can 
> > define a macro like:
> > 
> > %cross-file share/foo
> > 
> > which would be placed in %install, expand to something like:
> > 
> > echo '%{_mingw32_prefix}/share/foo' >>mingw32-files.txt
> > echo '%{_mingw64_prefix}/share/foo' >>mingw64-files.txt
> > echo '%{_darwinx_prefix}/share/foo' >>darwinx-files.txt
> > 
> > and be used with:
> > 
> > %files -n mingw32-foo -f mingw32-files.txt
> > %defattr(-,root,root,-)
> > 
> > %files -n mingw64-foo -f mingw64-files.txt
> > %defattr(-,root,root,-)
> > 
> > %files -n darwinx-foo -f darwinx-files.txt
> > %defattr(-,root,root,-)
> 
> This looks like an interesting method! I'll try to experiment a bit with
> it and see if I can get per-target binary packages out of it.

I've played around a bit with this method and eventually the .spec files
started to become less readable (with file list entries in the %install
section) and other hacks had to be applied for special entries like %
dir.

For now I dropped the filelist macros idea and I'm adjusting the
various .spec files to use complete per-package filelists. With this
method it's possible to generate per-target RPMs from a single .spec
file. The downside of this situation is that there will be a lot of
(almost) duplicate code in the .spec files but we might be able to
optimize that later. Updated packages will arrive in the testing
repository soon.

Regards,

Erik van Pienbroek




More information about the mingw mailing list