File ocaml-utop.spec of Package ocaml-utop

#
# spec file for package ocaml-utop
#
# Copyright (c) 2025 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 https://bugs.opensuse.org/
#


Name:           ocaml-utop
Version:        2.15.0
Release:        0
%{?ocaml_preserve_bytecode}
Summary:        Universal toplevel for OCaml
License:        BSD-3-Clause
ExclusiveArch:  aarch64 ppc64 ppc64le riscv64 s390x x86_64
Group:          Development/Languages/OCaml
URL:            https://opam.ocaml.org/packages/utop
Source0:        %name-%version.tar.xz
BuildRequires:  ocaml(ocaml_base_version) >= 4.11
BuildRequires:  ocaml-cppo
BuildRequires:  ocaml-dune >= 2.7
BuildRequires:  ocaml-rpm-macros >= 20240909
BuildRequires:  ocamlfind(alcotest)
BuildRequires:  ocamlfind(compiler-libs.toplevel)
BuildRequires:  ocamlfind(findlib.top)
BuildRequires:  ocamlfind(lambda-term)
BuildRequires:  ocamlfind(logs.lwt)
BuildRequires:  ocamlfind(threads)
BuildRequires:  ocamlfind(unix)
BuildRequires:  ocamlfind(xdg)
BuildRequires:  ocamlfind(zed)

%description
utop is an improved toplevel (i.e., Read-Eval-Print Loop) for OCaml. It can run in a terminal or in Emacs. It supports line editing, history, real-time and context sensitive completion, colors, and more.

It integrates with the Tuareg and typerex modes in Emacs.

%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.

%prep
%autosetup -p1

%build
dune_release_pkgs='utop'
%ocaml_dune_setup
dune rules src/top/utop.bc || : fail
%ocaml_dune_build

%install
%ocaml_dune_install
%ocaml_create_file_list

%check
%ocaml_dune_test

%files -f %name.files
%doc README.md
%_bindir/*
%_mandir/*/*
%_datadir/emacs
%_datadir/utop

%files devel -f %name.files.devel

%changelog
openSUSE Build Service is sponsored by