Toshio Kuratomi wrote:
On Sat, 2007-06-02 at 15:21 +0100, Richard W.M. Jones wrote:
> I ended up copying the solution that Debian use -- when building detect
> if ocamlopt (the native code compiler) is available.
>
>
http://fedoraproject.org/wiki/PackagingDrafts/OCaml?action=show#head-14a9...
>
> I built four packages this way, testing on a "simulated" bytecode-only
> architecture.
>
Looks good. What are the caveats to doing things this way for the %
files section? I imagine as long as wildcards are used it will work but
we might want to have an example with a comment saying that the wildcard
makes it work on both native and non-native archs.
With the four packages I did so far, I ended up with %if %opt
conditionals in the %files section. For example:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240571
http://annexia.org/tmp/ocaml-calendar.spec
has:
%files devel
%defattr(-,root,root,-)
%doc CHANGES README TODO
%{_libdir}/ocaml/calendar/META
%if %opt
%{_libdir}/ocaml/calendar/*.a
%{_libdir}/ocaml/calendar/*.cmxa
%endif
%{_libdir}/ocaml/calendar/*.mli
Is that not right?
Rich.
--
Emerging Technologies, Red Hat -
http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903