# comment out when not pre-release #global pre_tag beta6 %define rel 1 Name: opam Version: 2.1.3 Release: %mkrel %{?pre_tag:0.%pre_tag.}%{rel} Summary: A source-based package manager for OCaml Group: Development/OCaml # Standard "OCaml linking exception", see included file. License: LGPLv2 with exceptions URL: https://github.com/ocaml/opam Source0: https://github.com/ocaml/opam/archive/%{version}/%{name}-%{version}.tar.gz # Debian patch to port to dose3 version 6 and later # https://sources.debian.org/patches/opam/2.0.8-1/0005-Port-to-Dose3-6.0.1.patch/ Patch0: %{name}-port-to-dose3-6.0.1.patch # Adapt to the removal of Base64 from extlib Patch1: %{name}-base64.patch BuildRequires: make BuildRequires: ocaml > 4.02.3 BuildRequires: ocaml-dune BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-cmdliner-devel BuildRequires: ocaml-cppo BuildRequires: ocaml-ocamlgraph-devel BuildRequires: ocaml-re-devel BuildRequires: ocaml-cudf-devel BuildRequires: ocaml-opam-file-format-devel BuildRequires: ocaml-base64-devel BuildRequires: ocaml-dose3-devel BuildRequires: ocaml-extlib-devel BuildRequires: ocaml-mccs-devel BuildRequires: ocaml-z3-devel BuildRequires: git BuildRequires: gcc-c++ BuildRequires: bzip2 BuildRequires: libacl-devel # Needed to install packages and run opam init. Requires: bubblewrap Requires: bzip2 Requires: diffutils Requires: gcc Requires: make Requires: m4 Requires: patch Requires: unzip Requires: tar %description OPAM stands for OCaml PAckage Manager. It aims to suit to a vast number of users and use cases, and has unique features: * Powerful handling of dependencies: versions constraints, optional dependencies, conflicts, etc. * Multiple repositories backends: HTTP, rsync, git * Ease to create packages and repositories * Ability to switch between different compiler versions Typically, OPAM will probably make your life easier if you recognize yourself in at least one of these profiles: * You use multiple versions of the OCaml compiler, or you hack the compiler yourself and needs to frequently switch between compiler versions. * You use or develop software that needs a specific and/or modified version of the OCaml compiler to be installed. * You use or develop software that depends on a specific version of an OCaml library, or you just want to install a specific version of a package, not just the latest one. * You want to create your own packages yourself, put them on your own repository, with minimal effort. %package doc Summary: Documentation files for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc The %{name}-doc package contains documentation for using %{name}. %prep %autosetup -p1 -n %{name}-%{version}%{?pre_tag:-%pre_tag} %build %configure sed 's/OPAMINSTALLER_FLAGS=/OPAMINSTALLER_FLAGS+=/g' -i Makefile export DUNE_ARGS="--verbose" # Need to set the path so Makefile can run the opam command. export PATH=$PWD:$PATH # Parallel build does not succeed. make %install export DUNE_ARGS="--verbose" export PATH=$PWD:$PATH # The makefile looks like it tries to invoke ocamlfind but only if DESTDIR # isn't set. If it is set (which it is) LIBINSTALLDIR must be set too # for installing opam-installer metadata. %make_install LIBINSTALL_DIR=%{buildroot}/%{_libdir}/ocaml # However it looks like some (extra) documentation gets # installed in the wrong place so... delete it. rm -rf %{buildroot}%{_prefix}/doc %files %license LICENSE %doc README.md CHANGES AUTHORS CONTRIBUTING.md %{_bindir}/%{name} %{_bindir}/%{name}-installer %{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}-*.1* %files doc %doc doc/ %doc tests/ %doc shell/