Announcing the Cross Compiler Framework (Win32+Win64)

Erik van Pienbroek erik at vanpienbroek.nl
Sun Jan 9 12:47:59 UTC 2011


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.

Thanks,

Erik van Pienbroek




More information about the mingw mailing list