OCaml and static linking (was old thread: Re: [Fedora-packaging] Issues with Ocaml and Static Linking)

Richard W.M. Jones rjones at redhat.com
Thu Jun 7 18:41:10 UTC 2007


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-14a9d22bff07b51f58d01bb4e79bcbe98e426a7c
>>
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070607/f77d9b38/attachment.bin>


More information about the Fedora-packaging mailing list