1 |
# comment out when not pre-release |
2 |
#global pre_tag beta6 |
3 |
|
4 |
%define rel 1 |
5 |
|
6 |
Name: opam |
7 |
Version: 2.1.3 |
8 |
Release: %mkrel %{?pre_tag:0.%pre_tag.}%{rel} |
9 |
Summary: A source-based package manager for OCaml |
10 |
Group: Development/OCaml |
11 |
# Standard "OCaml linking exception", see included file. |
12 |
License: LGPLv2 with exceptions |
13 |
URL: https://github.com/ocaml/opam |
14 |
Source0: https://github.com/ocaml/opam/archive/%{version}/%{name}-%{version}.tar.gz |
15 |
# Debian patch to port to dose3 version 6 and later |
16 |
# https://sources.debian.org/patches/opam/2.0.8-1/0005-Port-to-Dose3-6.0.1.patch/ |
17 |
Patch0: %{name}-port-to-dose3-6.0.1.patch |
18 |
# Adapt to the removal of Base64 from extlib |
19 |
Patch1: %{name}-base64.patch |
20 |
|
21 |
BuildRequires: make |
22 |
BuildRequires: ocaml > 4.02.3 |
23 |
BuildRequires: ocaml-dune |
24 |
BuildRequires: ocaml-findlib |
25 |
BuildRequires: ocaml-ocamlbuild |
26 |
BuildRequires: ocaml-ocamldoc |
27 |
|
28 |
BuildRequires: ocaml-cmdliner-devel |
29 |
BuildRequires: ocaml-cppo |
30 |
BuildRequires: ocaml-ocamlgraph-devel |
31 |
BuildRequires: ocaml-re-devel |
32 |
BuildRequires: ocaml-cudf-devel |
33 |
BuildRequires: ocaml-opam-file-format-devel |
34 |
BuildRequires: ocaml-base64-devel |
35 |
BuildRequires: ocaml-dose3-devel |
36 |
BuildRequires: ocaml-extlib-devel |
37 |
BuildRequires: ocaml-mccs-devel |
38 |
BuildRequires: ocaml-z3-devel |
39 |
|
40 |
BuildRequires: git |
41 |
BuildRequires: gcc-c++ |
42 |
BuildRequires: bzip2 |
43 |
BuildRequires: libacl-devel |
44 |
|
45 |
# Needed to install packages and run opam init. |
46 |
Requires: bubblewrap |
47 |
Requires: bzip2 |
48 |
Requires: diffutils |
49 |
Requires: gcc |
50 |
Requires: make |
51 |
Requires: m4 |
52 |
Requires: patch |
53 |
Requires: unzip |
54 |
Requires: tar |
55 |
|
56 |
%description |
57 |
OPAM stands for OCaml PAckage Manager. |
58 |
It aims to suit to a vast number of users and use cases, |
59 |
and has unique features: |
60 |
|
61 |
* Powerful handling of dependencies: |
62 |
versions constraints, optional dependencies, conflicts, etc. |
63 |
* Multiple repositories backends: HTTP, rsync, git |
64 |
* Ease to create packages and repositories |
65 |
* Ability to switch between different compiler versions |
66 |
|
67 |
Typically, OPAM will probably make your life easier if you recognize |
68 |
yourself in at least one of these profiles: |
69 |
|
70 |
* You use multiple versions of the OCaml compiler, or you hack the |
71 |
compiler yourself and needs to frequently switch between compiler |
72 |
versions. |
73 |
* You use or develop software that needs a specific and/or modified |
74 |
version of the OCaml compiler to be installed. |
75 |
* You use or develop software that depends on a specific version of an |
76 |
OCaml library, or you just want to install a specific version of a |
77 |
package, not just the latest one. |
78 |
* You want to create your own packages yourself, put them on your own |
79 |
repository, with minimal effort. |
80 |
|
81 |
%package doc |
82 |
Summary: Documentation files for %{name} |
83 |
Group: Documentation |
84 |
Requires: %{name} = %{version}-%{release} |
85 |
|
86 |
%description doc |
87 |
The %{name}-doc package contains documentation for using %{name}. |
88 |
|
89 |
%prep |
90 |
%autosetup -p1 -n %{name}-%{version}%{?pre_tag:-%pre_tag} |
91 |
|
92 |
%build |
93 |
%configure |
94 |
sed 's/OPAMINSTALLER_FLAGS=/OPAMINSTALLER_FLAGS+=/g' -i Makefile |
95 |
|
96 |
export DUNE_ARGS="--verbose" |
97 |
# Need to set the path so Makefile can run the opam command. |
98 |
export PATH=$PWD:$PATH |
99 |
|
100 |
# Parallel build does not succeed. |
101 |
make |
102 |
|
103 |
%install |
104 |
export DUNE_ARGS="--verbose" |
105 |
export PATH=$PWD:$PATH |
106 |
|
107 |
# The makefile looks like it tries to invoke ocamlfind but only if DESTDIR |
108 |
# isn't set. If it is set (which it is) LIBINSTALLDIR must be set too |
109 |
# for installing opam-installer metadata. |
110 |
%make_install LIBINSTALL_DIR=%{buildroot}/%{_libdir}/ocaml |
111 |
|
112 |
# However it looks like some (extra) documentation gets |
113 |
# installed in the wrong place so... delete it. |
114 |
rm -rf %{buildroot}%{_prefix}/doc |
115 |
|
116 |
%files |
117 |
%license LICENSE |
118 |
%doc README.md CHANGES AUTHORS CONTRIBUTING.md |
119 |
%{_bindir}/%{name} |
120 |
%{_bindir}/%{name}-installer |
121 |
%{_mandir}/man1/%{name}.1* |
122 |
%{_mandir}/man1/%{name}-*.1* |
123 |
|
124 |
%files doc |
125 |
%doc doc/ |
126 |
%doc tests/ |
127 |
%doc shell/ |