File ocaml-fuse.spec of Package ocaml-fuse

#
# spec file for package ocaml-fuse
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2015 LISA GmbH, Bingen, 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 https://bugs.opensuse.org/
#


Name:           ocaml-fuse
Version:        2.7.1
Release:        0
%{?ocaml_preserve_bytecode}
Summary:        Ocaml FUSE binding
License:        GPL-2.0-only
Group:          Development/Languages/OCaml
URL:            https://opam.ocaml.org/packages/ocamlfuse
Source:         %name-%version.tar.xz
Patch0:         ocaml-fuse.patch
Provides:       ocamlfuse = %version-%release
Obsoletes:      ocamlfuse < %version-%release
BuildRequires:  ocaml
BuildRequires:  ocaml-dune >= 3.7
BuildRequires:  ocaml-findlib
BuildRequires:  ocaml-rpm-macros >= 20240909
BuildRequires:  ocamlfind(bigarray)
BuildRequires:  ocamlfind(camlidl)
BuildRequires:  ocamlfind(dune-configurator)
BuildRequires:  ocamlfind(threads)
BuildRequires:  ocamlfind(unix)
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(fuse)

%description
This is a binding to fuse for the ocaml programming language, enabling
you to write multithreaded filesystems in the ocaml language. It has
been designed with simplicity as a goal, as you can see by looking at
example/fusexmp.ml. Efficiency has also been a separate goal. The
Bigarray library is used for read and writes, allowing the library to
do zero-copy in ocaml land.

%package        devel
Summary:        Development files for %name
Group:          Development/Languages/OCaml
Requires:       %name = %version
Requires:       pkgconfig(fuse)
Provides:       ocamlfuse-debuginfo = %version-%release
Provides:       ocamlfuse-debugsource = %version-%release
Provides:       ocamlfuse-devel = %version-%release
Obsoletes:      ocamlfuse-debuginfo < %version-%release
Obsoletes:      ocamlfuse-debugsource < %version-%release
Obsoletes:      ocamlfuse-devel < %version-%release

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

%prep
%autosetup -p1

%build
dune_release_pkgs='ocamlfuse'
%ocaml_dune_setup
%ocaml_dune_build

%install
%ocaml_dune_install
%ocaml_create_file_list

%check
%ocaml_dune_test

%files -f %name.files

%files devel -f %name.files.devel

%changelog
openSUSE Build Service is sponsored by