File opam.spec of Package opam

#
# spec file for package opam
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           opam
Version:        1.2.2
Release:        0
Summary:        Source-based package manager for OCaml
License:        LGPL-2.1
Group:          System/Packages
URL:            https://opam.ocaml.org/
Source:         https://github.com/ocaml/opam/archive/%{version}/%{name}-%{version}.tar.gz

# https://discuss.ocaml.org/t/the-forever-beta-issue/1779/6?u=andyli
Patch1:         newer-deps.patch

BuildRequires:  curl
BuildRequires:  ocaml >= 4.02.3
BuildRequires:  ocaml(Ocamlbuild)
BuildRequires:  ocamlfind
BuildRequires:  ocamlfind(cmdliner)
BuildRequires:  ocamlfind(cudf)
BuildRequires:  ocamlfind(dose3)
BuildRequires:  ocamlfind(extlib)
BuildRequires:  ocamlfind(jsonm)
BuildRequires:  ocamlfind(ocamlgraph)
BuildRequires:  ocamlfind(re)

Requires:       %{name}-installer%{?_isa} = %{version}-%{release}

# https://cygwin.com/ml/cygwin/2018-01/msg00079.html
Requires:       diffutils
Requires:       tar
Requires:       patch
Requires:       unzip
Requires:       curl
Recommends:     gcc
Recommends:     make
Recommends:     m4
Recommends:     rsync
Recommends:     git
Recommends:     mercurial
Suggests:       ocaml

%description
OPAM is a source-based package manager for OCaml. It supports multiple
simultaneous compiler installations, flexible package constraints, and a
Git-friendly development workflow.

%package installer
Summary:        Standalone tool for opam install files
%description installer
Handles (un)installation of package files following instructions from
OPAM *.install files.

%prep
%setup -q -n %{name}-%{version}
%patch1 -p1

%build
%configure
make

%install
%make_install

%files
%doc AUTHORS CHANGES CONTRIBUTING.md README.md
%license LICENSE
%{_bindir}/opam
%{_bindir}/opam-admin

%files installer
%license LICENSE
%{_bindir}/opam-installer

%changelog
openSUSE Build Service is sponsored by