Announcing the Cross Compiler Framework (Win32+Win64)
Kevin Kofler
kevin.kofler at chello.at
Fri Jan 7 03:13:06 UTC 2011
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?
Uh, I'm not sure how:
%files
%defattr(-,root,root,-)
%{_mingw32_...}/foo
%{_mingw64_...}/foo
%{_darwinx_...}/foo
%{_mingw32_...}/bar
%{_mingw64_...}/bar
%{_darwinx_...}/bar
%{_mingw32_...}/baz
%{_mingw64_...}/baz
%{_darwinx_...}/baz
is any better than:
%files -n mingw32-foo
%defattr(-,root,root,-)
%{_mingw32_...}/foo
%{_mingw32_...}/bar
%{_mingw32_...}/baz
%files -n mingw64-foo
%defattr(-,root,root,-)
%{_mingw64_...}/foo
%{_mingw64_...}/bar
%{_mingw64_...}/baz
%files -n darwinx-foo
%defattr(-,root,root,-)
%{_darwinx_...}/foo
%{_darwinx_...}/bar
%{_darwinx_...}/baz
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,-)
Kevin Kofler
More information about the mingw
mailing list