File opam.spec of Package opam

# spec file for package opam
# Copyright (c) 2021 SUSE LLC
# 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

Name:           opam
Version:        2.0.8
Release:        0
Summary:        Source-based package manager for OCaml
License:        LGPL-2.1-only WITH OCaml-LGPL-linking-exception
Group:          System/Packages
Source:         %{name}-%{version}.tar.xz
Patch0:         opam.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  ocaml
BuildRequires:  ocaml-cppo
BuildRequires:  ocaml-dune
BuildRequires:  ocaml-rpm-macros >= 20210121
BuildRequires:  ocamlfind(bigarray)
BuildRequires:  ocamlfind(cmdliner)
BuildRequires:  ocamlfind(cudf)
BuildRequires:  ocamlfind(dose3)
BuildRequires:  ocamlfind(mccs)
BuildRequires:  ocamlfind(ocamlgraph)
BuildRequires:  ocamlfind(opam-file-format)
BuildRequires:  ocamlfind(re)
BuildRequires:  ocamlfind(unix)

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

Requires:       bubblewrap

Requires:       bzip2
Requires:       curl
Requires:       diffutils
Requires:       gzip
Requires:       patch
Requires:       tar
Requires:       unzip
Recommends:     gcc
Recommends:     make
Recommends:     m4
Recommends:     rsync
Recommends:     git
Recommends:     mercurial
Suggests:       ocaml

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
Group:          System/Packages
Requires:       %{name} = %{version}-%{release}

%description installer
Handles (un)installation of package files following instructions from
OPAM *.install files.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Languages/OCaml
Requires:       %{name} = %{version}

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%autosetup -p1

# wipe bogus FETCH
grep -n FETCH
sed -i~ '/FETCH/d;246,+7d'
diff -u "$_"~ "$_" && exit 1
export DUNE=$(type -P dune)
export CPPO=$(type -P cppo)
export PATCH=$(type -P false)
export BUNZIP2=$(type -P false)
autoreconf -fi


%files -f %{name}.files

%files devel -f %{name}.files.devel

%files installer

openSUSE Build Service is sponsored by