English
then define conditional sections in %build, %install and %files if necessary. For example:
%build
make byte
%if %opt
make opt
%endif
To test that your spec file will work on such an architecture, temporarily remove or rename /usr/bin/ocamlopt and /usr/bin/ocamlopt.opt while building.
Rationale: Debian packaging policy section 2.3 does the same thing.
Unnecessary files
The following files should not normally be distributed:
*.cmo object files. Exception: see above.
*.o for corresponding *.cmx. Exception: see above.
*.ml sources. Exception: see above.
Security issues in OCaml libraries
If a security issue arises in an OCaml library, then all libraries and binaries which depend on it must be recompiled.
OCaml scripts do not need to be changed (unless resolving the security issue requires changing the public interface to the library and the script is broken by the change). This is because OCaml scripts are recompiled each time they run.
Further reading
https://lists.debian.org/debian-ocaml-maint/2005/01/threads.html#00042 - Thread on ABI compatibility of different versions of OCaml.
https://www.redhat.com/archives/fedora-devel-list/2007-May/msg01234.html - Explains lack of dynamic linking in upstream.
https://www.redhat.com/archives/fedora-devel-list/2007-May/msg01280.html - Proposal to include MD5 sums in RPM deps.
https://bugzilla.redhat.com/show_bug.cgi?id=433783 - Common rpmlint errors and warnings in OCaml packages.