Files
claude bc688a0368 fix i586 build: use make world (bytecode only) and exclude native-only files from %files
ignore Dynlink_cmo_format and Dynlink_cmxs_format in __ocaml_requires_opts (internal dynlink modules, approach from CentOS Stream) [release 5.4.1-3mamba;Thu Apr 30 2026]
2026-05-05 22:18:31 +02:00

538 lines
18 KiB
RPMSpec

%define majorminor %(echo %version | cut -d. -f 1-2)
Name: ocaml
Version: 5.4.1
Release: 3mamba
Summary: The OCaml compiler and programming environment
Group: Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan@openmamba.org>
URL: https://ocaml.org/
Source0: http://caml.inria.fr/pub/distrib/ocaml-%{majorminor}/ocaml-%{version}.tar.xz
Source1: http://caml.inria.fr/pub/distrib/ocaml-%{majorminor}/ocaml-%{majorminor}-refman.pdf
Source2: http://caml.inria.fr/pub/distrib/ocaml-%{majorminor}/ocaml-%{majorminor}-refman-html.tar.gz
Source3: http://caml.inria.fr/pub/distrib/ocaml-%{majorminor}/ocaml-%{majorminor}-refman.info.tar.gz
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libzstd-devel
## AUTOBUILDREQ-END
BuildRequires: emacs-nox
BuildRequires: libgdbm-devel
Requires: %{name}-runtime = %{?epoch:%epoch:}%{version}-%{release}
Requires: gcc
# From Fedora:
# Because we pass -c flag to ocaml-find-requires (to avoid circular
# dependencies) we also have to explicitly depend on the right version
# of ocaml-runtime.
Requires: ocaml-runtime = %{?epoch:%epoch:}%{version}-%{release}
Provides: ocaml(compiler) = %{version}
# OCaml 5 exposes Seq as a stdlib alias but does not install seq.cmi.
# Provide the interface hash explicitly so dependent packages can resolve it.
Provides: ocaml(Seq) = d501be6def44505b4b6cae26de0c9204
%ifarch %{ix86}
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Dynlink_cmo_format -i Dynlink_cmxs_format -i Backend_intf -i Inlining_decision_intf -i Simplify_boxed_integer_ops_intf
%else
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Dynlink_cmo_format -i Dynlink_cmxs_format
%endif
%global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte'
# FIXME:
#
# BFD library not found, 'objinfo' will be unable to display info on .cmxs files
# ./hasgot -i bfd.h && \
# ./hasgot -lbfd -ldl -liberty -lz bfd_openr; then
%description
OCaml is a general-purpose programming language, designed with program safety and reliability in mind.
It is very expressive, yet easy to learn and use.
OCaml supports functional, imperative, and object-oriented programming styles.
It has been developed and distributed by INRIA, France's national research institute for computer science, since 1985.
This package provides in particular the following tools:
* ocamlc: the OCaml batch compiler,
* ocamlopt: the OCaml high-performance native-code compiler,
* ocamldep: the dependency generator (in a format suitable for the make utility),
* ocaml: the interactive (command-line) toplevel system,
* ocamlmktop: builds OCaml toplevels that contain user code preloaded at start-up,
* ocamllex: the OCaml lexical analyser, very close to lex,
* ocamlyacc: the OCaml parser generator, in the style yacc.
* ocamldebug: the OCaml source-level replay debugger,
* ocamlprof: the OCaml profiling tool,
for programs compiled in profiling mode by using either
ocamlcp: the front-end to the ocamlc compiler
or
ocamloptp: the front-end to the ocamlopt compiler,
* ocamlbuild:
automates the compilation of most OCaml projects with minimal user intervention,
* ocamlmklib: a tool for building mixed C/OCaml libraries
* ocamlobjinfo: a tool for displaying informations on files
%package runtime
Group: Applications/Development
Summary: OCaml runtime environment
Provides: ocaml(runtime) = %{?epoch:%epoch:}%{version}-%{release}
%description runtime
This package contains the runtime environment needed to run OCaml bytecode.
In particular the OCaml bytecode interpreter: ocamlrun.
%package source
Summary: Source code for OCaml libraries
Requires: ocaml = %{?epoch:%epoch:}%{version}-%{release}
%description source
Source code for OCaml libraries.
%package compiler-libs
Summary: Compiler libraries for OCaml
Requires: ocaml = %{?epoch:%epoch:}%{version}-%{release}
%description compiler-libs
OCaml is a high-level, strongly-typed, functional and object-oriented programming language from the ML family of languages.
This package contains some modules used internally by the OCaml compilers, useful for the development of some OCaml applications.
Note that this exposes internal details of the OCaml compiler which may not be portable between versions.
%package camlp4
Summary: Pre-Processor-Pretty-Printer for OCaml
Requires: %{name}-runtime = %{?epoch:%epoch:}%{version}-%{release}
%description camlp4
Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source file and printing some result on standard output.
This package contains the runtime files.
%package camlp4-devel
Summary: Pre-Processor-Pretty-Printer for OCaml
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-camlp4 = %{?epoch:%epoch:}%{version}-%{release}
%description camlp4-devel
Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source file and printing some result on standard output.
RPM_OPT_FLAGS=`$RPM_OPT_FLAGS | sed "s|-fomit-frame-pointer||"
export RPM_OPT_FLAGS
This package contains the development files.
%package x11
Summary: X11 support for OCaml
Requires: %{name}-runtime = %{?epoch:%epoch:}%{version}-%{release}
Requires: libX11-devel
%description x11
X11 support for OCaml.
%package labltk
Group: Applications/Development
Summary: Tk bindings for OCaml
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description labltk
Labltk is a library for interfacing OCaml with the scripting language Tcl/Tk.
This package contains the runtime files.
%package labltk-devel
Group: Development/Libraries
Summary: Development files for labltk
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-labltk = %{?epoch:%epoch:}%{version}-%{release}
Requires: libX11-devel
Requires: libtcl-devel
Requires: libtk-devel
%description labltk-devel
Labltk is a library for interfacing OCaml with the scripting language Tcl/Tk.
This package contains the development files.
%package emacs
Group: Applications/Development
Summary: Emacs mode for OCaml
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: emacs-nox
%description emacs
Emacs mode for OCaml.
%package ocamldoc
Group: Applications/Development
Summary: Documentation generator for OCaml
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description ocamldoc
Documentation generator for OCaml.
%package docs
Group: Documentation
Summary: Documentation for OCaml
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
Provides: ocaml-manual
Obsoletes: ocaml-manual < 4.14.0
%description docs
OCaml is a general-purpose programming language, designed with program safety and reliability in mind.
This package contains documentation in PDF and HTML format as well as man pages and info files.
%ifarch %{ix86}
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Dynlink_cmo_format -i Dynlink_cmxs_format -i Backend_intf -i Inlining_decision_intf -i Simplify_boxed_integer_ops_intf
%else
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Dynlink_cmo_format -i Dynlink_cmxs_format
%endif
%global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte'
%prep
%setup -q -a2 -a3
#% setup -q -D -T
#:<< _EOF
cp %{S:1} refman.pdf
%build
:<< _EOF
%configure \
--libdir=%{_libdir}/ocaml \
--with-pic
%ifarch %{ix86}
%make -j1 world
%else
%make -j1 world.opt
%endif
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall \
LIBDIR=%{_libdir}/ocaml
mkdir -p %{buildroot}%{_infodir}
cd infoman
cp ocaml*.gz %{buildroot}%{_infodir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post docs
%install_info %{name}.info
exit 0
%preun docs
if [ $1 -eq 0 ]; then
%uninstall_info %{name}.info
fi
exit 0
%files
%defattr(-,root,root)
%{_bindir}/ocaml
%{_bindir}/ocamlc
%{_bindir}/ocamlc.byte
%{_bindir}/ocamlcmt
%{_bindir}/ocamldep.byte
%{_bindir}/ocamllex.byte
%{_bindir}/ocamlobjinfo.byte
%{_bindir}/ocamlcp
%{_bindir}/ocamldebug
%{_bindir}/ocamldep
%{_bindir}/ocamllex
%{_bindir}/ocamlmklib
%{_bindir}/ocamlmktop
%{_bindir}/ocamlobjinfo
%{_bindir}/ocamlprof
%{_bindir}/ocamlyacc
%{_libdir}/ocaml/expunge
%{_libdir}/ocaml/ld.conf
%{_libdir}/ocaml/Makefile.config
%{_libdir}/ocaml/*.mli
%{_libdir}/ocaml/libcamlrun_shared.so
%ifarch %{ix86}
%{_libdir}/ocaml/libcaml*.a
%{_libdir}/ocaml/libthreads.a
%{_libdir}/ocaml/libunixbyt.a
%{_libdir}/ocaml/runtime-launch-info
%{_libdir}/ocaml/runtime_events/runtime_events.mli
%{_libdir}/ocaml/str/str.mli
%{_libdir}/ocaml/threads/event.cmti
%{_libdir}/ocaml/threads/event.mli
%{_libdir}/ocaml/threads/thread.cmti
%{_libdir}/ocaml/threads/thread.mli
%{_libdir}/ocaml/unix/unix.mli
%{_libdir}/ocaml/unix/unixLabels.mli
%endif
%{_libdir}/ocaml/sys.ml.in
%{_libdir}/ocaml/caml
%ifnarch %{ix86}
%{_bindir}/ocamlc.opt
%{_bindir}/ocamlobjinfo.opt
%{_bindir}/ocamlopt.byte
%{_bindir}/ocamldep.opt
%{_bindir}/ocamllex.opt
%{_bindir}/ocamlopt
%{_bindir}/ocamlopt.opt
%{_bindir}/ocamloptp
%{_libdir}/ocaml/*.a
%{_libdir}/ocaml/*.cmxa
%{_libdir}/ocaml/*.cmx
%{_libdir}/ocaml/*.o
%{_libdir}/ocaml/libasmrun_shared.so
%{_libdir}/ocaml/dynlink/*.a
%{_libdir}/ocaml/dynlink/*.cmx
%{_libdir}/ocaml/dynlink/*.cmxa
%endif
%{_libdir}/ocaml/dynlink/*.mli
%ifnarch %{ix86}
%{_libdir}/ocaml/profiling/*.cmx
%{_libdir}/ocaml/profiling/*.o
%{_libdir}/ocaml/runtime_events/*.a
%{_libdir}/ocaml/runtime_events/*.cmx
%{_libdir}/ocaml/runtime_events/*.cmxa
%{_libdir}/ocaml/runtime_events/*.cmxs
%{_libdir}/ocaml/runtime_events/*.mli
%{_libdir}/ocaml/runtime-launch-info
%{_libdir}/ocaml/str/*.a
%{_libdir}/ocaml/str/*.cmx
%{_libdir}/ocaml/str/*.cmxa
%{_libdir}/ocaml/str/*.cmxs
%{_libdir}/ocaml/str/*.mli
%{_libdir}/ocaml/unix/*.a
%{_libdir}/ocaml/unix/*.cmx
%{_libdir}/ocaml/unix/*.cmxa
%{_libdir}/ocaml/unix/*.cmxs
%{_libdir}/ocaml/unix/*.mli
%{_libdir}/ocaml/threads/*.a
%{_libdir}/ocaml/threads/*.cmx
%{_libdir}/ocaml/threads/*.cmxa
%{_libdir}/ocaml/threads/*.cmti
%{_libdir}/ocaml/threads/*.mli
%endif
%{_mandir}/man1/ocaml.*
%{_mandir}/man1/ocamlc.*
%{_mandir}/man1/ocamlcp.*
%{_mandir}/man1/ocamldebug.*
%{_mandir}/man1/ocamldep.*
%{_mandir}/man1/ocamllex.*
%{_mandir}/man1/ocamlmktop.*
%{_mandir}/man1/ocamlopt.*
%{_mandir}/man1/ocamloptp.*
%{_mandir}/man1/ocamlprof.*
%{_mandir}/man1/ocamlyacc.*
%files runtime
%defattr(-,root,root)
%{_bindir}/ocamlrun
%{_bindir}/ocamlrund
%{_bindir}/ocamlruni
%dir %{_libdir}/ocaml
%{_libdir}/ocaml/*.cmo
%{_libdir}/ocaml/*.cmi
%{_libdir}/ocaml/*.cma
%dir %{_libdir}/ocaml/dynlink
%{_libdir}/ocaml/dynlink/META
%{_libdir}/ocaml/dynlink/*.cma
%{_libdir}/ocaml/dynlink/*.cmi
%{_libdir}/ocaml/dynlink/*.cmti
%dir %{_libdir}/ocaml/profiling
%{_libdir}/ocaml/profiling/*.cmi
%{_libdir}/ocaml/profiling/*.cmo
%{_libdir}/ocaml/profiling/*.cmt
%{_libdir}/ocaml/profiling/*.cmti
%dir %{_libdir}/ocaml/runtime_events
%{_libdir}/ocaml/runtime_events/META
%{_libdir}/ocaml/runtime_events/*.cma
%{_libdir}/ocaml/runtime_events/*.cmi
%{_libdir}/ocaml/runtime_events/*.cmti
%dir %{_libdir}/ocaml/stdlib
%{_libdir}/ocaml/stdlib/META
%dir %{_libdir}/ocaml/str
%{_libdir}/ocaml/str/META
%{_libdir}/ocaml/str/*.cma
%{_libdir}/ocaml/str/*.cmi
%{_libdir}/ocaml/str/*.cmti
%dir %{_libdir}/ocaml/stublibs
%{_libdir}/ocaml/stublibs/dll*.so
%dir %{_libdir}/ocaml/threads
%{_libdir}/ocaml/threads/META
%{_libdir}/ocaml/threads/*.cmi
%{_libdir}/ocaml/threads/*.cma
%{_libdir}/ocaml/unix/META
%{_libdir}/ocaml/unix/*.cma
%{_libdir}/ocaml/unix/*.cmi
%{_libdir}/ocaml/unix/*.cmti
%dir %{_libdir}/ocaml/compiler-libs
%{_libdir}/ocaml/compiler-libs/*.cmi
%{_libdir}/ocaml/compiler-libs/*.cmo
%{_libdir}/ocaml/compiler-libs/*.cma
%{_mandir}/man1/ocamlrun.*
%doc LICENSE
%files source
%defattr(-,root,root)
%{_libdir}/ocaml/*.ml
%{_libdir}/ocaml/*.cmt
%{_libdir}/ocaml/*.cmti
%files compiler-libs
%defattr(-,root,root)
%{_libdir}/ocaml/compiler-libs/META
%{_libdir}/ocaml/compiler-libs/*.mli
%{_libdir}/ocaml/compiler-libs/*.cmt
%{_libdir}/ocaml/compiler-libs/*.cmti
%ifnarch %{ix86}
%{_libdir}/ocaml/compiler-libs/*.a
%{_libdir}/ocaml/compiler-libs/*.cmx
%{_libdir}/ocaml/compiler-libs/*.cmxa
%{_libdir}/ocaml/compiler-libs/*.o
%endif
%files ocamldoc
%defattr(-,root,root)
%{_bindir}/ocamldoc*
%{_libdir}/ocaml/ocamldoc
%{_mandir}/man1/ocamldoc.*
%files docs
%defattr(-,root,root)
%{_infodir}/*
%{_mandir}/man3/*
%dir %{_datadir}/doc/ocaml
%{_datadir}/doc/ocaml/*
%changelog
* Thu Apr 30 2026 Claude <claude@openmamba.org> 5.4.1-3mamba
- fix i586 build: use make world (bytecode only) and exclude native-only files from %files
- ignore Dynlink_cmo_format and Dynlink_cmxs_format in __ocaml_requires_opts (internal dynlink modules, approach from CentOS Stream)
* Wed Apr 29 2026 Claude <claude@openmamba.org> 5.4.1-2mamba
- add Provides for ocaml(Seq) = d501be6def44505b4b6cae26de0c9204 (stdlib Seq alias not exposed as .cmi in OCaml 5)
* Tue Feb 17 2026 Automatic Build System <autodist@openmamba.org> 5.4.1-1mamba
- automatic version update by autodist
* Fri Oct 10 2025 Automatic Build System <autodist@openmamba.org> 5.4.0-2mamba
- automatic version update by autodist
* Fri Oct 10 2025 Automatic Build System <autodist@openmamba.org> 5.4.0-1mamba
- automatic version update by autodist
* Thu Jan 09 2025 Automatic Build System <autodist@openmamba.org> 5.3.0-1mamba
- automatic version update by autodist
* Sat Dec 07 2024 Automatic Build System <autodist@openmamba.org> 5.2.1-1mamba
- automatic version update by autodist
* Fri Dec 08 2023 Automatic Build System <autodist@mambasoft.it> 5.1.1-1mamba
- automatic version update by autodist
* Sat Sep 16 2023 Automatic Build System <autodist@mambasoft.it> 5.1.0-1mamba
- automatic version update by autodist
* Fri Jun 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 5.0.0-2mamba
- bump release
* Fri Jun 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 5.0.0-1mamba
- update to 5.0.0
* Mon Apr 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-5mamba
- workaround ocaml-runtime requiring ocaml-compiler-libs by moving needed files into ocaml-runtime
* Sat Apr 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-4mamba
- added subpackages ocaml-source and ocaml-compiler-libs
* Thu Apr 22 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-3mamba
- rebuilt with recent rpm ocamldeps
* Thu Jan 21 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-2mamba
- rebuilt to fix provides
* Sun Oct 18 2020 Automatic Build System <autodist@mambasoft.it> 4.11.1-1mamba
- automatic version update by autodist
* Sat Oct 17 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.0-1mamba
- update to 4.11.0
* Mon Dec 30 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.09.0-4mamba
- rebuilt with recent gcc and --with-pic
* Fri Nov 22 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.09.0-3mamba
- ocaml-runtime: add provide ocaml(runtime)
* Fri Nov 22 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.09.0-2mamba
- rebuilt with ocaml-runtime 4.09.0 to fix requirement on previous version
* Fri Nov 15 2019 Automatic Build System <autodist@mambasoft.it> 4.09.0-1mamba
- automatic version update by autodist
* Thu Apr 25 2019 Automatic Build System <autodist@mambasoft.it> 4.07.1-1mamba
- automatic version update by autodist
* Sun Apr 21 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.07.0-1mamba
- update to 4.07.0
* Tue Jan 21 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 4.01.0-2mamba
- labtk-devel: require libtcl-devel and libtk-devel instead of libtcl85-devel and libtk85-devel
* Sun Nov 24 2013 Automatic Build System <autodist@mambasoft.it> 4.01.0-1mamba
- automatic version update by autodist
* Tue Jul 09 2013 Davide Madrisan <davide.madrisan@gmail.com> 4.00.1-4mamba
- new subpackage runtime, camlp4, camlp4-devel, x11, and ocamldoc
- build requires libtcl85-devel and libtk85-devel
* Mon Jul 01 2013 Automatic Build System <autodist@mambasoft.it> 4.00.1-3mamba
- pass -host option to configure to build for arm generic and fix rpi target
* Mon Jun 24 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.00.1-2mamba
- added labltk and emacs subpackages
* Mon Jun 17 2013 Davide Madrisan <davide.madrisan@gmail.com> 4.00.1-1mamba
- update to 4.00.1
* Wed Oct 24 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.1-4mamba
- rebuilt with binutils 2.23
* Wed Nov 30 2011 Automatic Build System <autodist@mambasoft.it> 3.12.1-3mamba
- automatic update by autodist
* Mon Nov 28 2011 Automatic Build System <autodist@mambasoft.it> 3.12.1-2mamba
- automatic update by autodist
* Tue Jul 19 2011 Automatic Build System <autodist@mambasoft.it> 3.12.1-1mamba
- automatic update by autodist
* Sun Dec 26 2010 Automatic Build System <autodist@mambasoft.it> 3.12.0-2mamba
- automatic update by autodist
* Fri Dec 17 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.0-1mamba
- update to 3.12.0
* Tue Feb 09 2010 Automatic Build System <autodist@mambasoft.it> 3.11.2-1mamba
- automatic update by autodist
* Fri Nov 13 2009 Davide Madrisan <davide.madrisan@gmail.com> 3.11.1-2mamba
- fix compilation issues
- build ocamlopt
* Fri Jun 26 2009 Automatic Build System <autodist@mambasoft.it> 3.11.1-1mamba
- automatic update by autodist
* Mon Dec 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.11.0-1mamba
- update to 3.11.0
* Mon Dec 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10.2-1mamba
- automatic update by autodist
* Mon Nov 05 2007 Aleph0 <aleph0@openmamba.org> 3.10.0-3mamba
- rebuild
* Sat Sep 29 2007 Aleph0 <aleph0@openmamba.org> 3.10.0-2mamba
- add official reference manual
* Fri Sep 28 2007 Aleph0 <aleph0@openmamba.org> 3.10.0-1mamba
- update to 3.10.0
* Fri Mar 02 2007 Aleph0 <aleph0@openmamba.org> 3.09.3-1qilnx
- package created by autospec