File ocaml-cryptokit.spec of Package ocaml-cryptokit

#
# spec file for package ocaml-cryptokit
#
# 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 http://bugs.opensuse.org/
#


Name:           ocaml-cryptokit
Version:        1.20
Release:        0
%{?ocaml_preserve_bytecode}
Summary:        Interface to Crypto functions for OCaml
License:        GPL-2.0
Group:          Development/Languages/OCaml
Url:            https://github.com/xavierleroy/cryptokit
Source0:        %name-%version.tar.xz
BuildRequires:  ncurses-devel
BuildRequires:  ocaml(ocaml_base_version) >= 4.08
BuildRequires:  ocaml-dune >= 2.5
BuildRequires:  ocaml-rpm-macros >= 20240909
BuildRequires:  ocamlfind(dune-configurator)
BuildRequires:  ocamlfind(unix)
BuildRequires:  ocamlfind(zarith)
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(zlib)

%description
A library of cryptographic primitive -- block ciphers (AES, DES, 3DES),
stream ciphers (ARCfour), public-key crypto (RSA, DH), hashes
(SHA-1, SHA-256), MACs, random number generation -- all presented with a
compositional, extensible interface.

%package devel
Summary:        Devel files for cryptokit
Group:          Development/Languages/OCaml
Requires:       ocaml-cryptokit = %version
Requires:       pkgconfig(zlib)

%description devel
Development files for ocaml-cryptokit

%prep
%autosetup -p1

%build
sed -i~ '
s@^let long_tests = ref false$@let long_tests = ref true@
' test/test.ml
diff -u "$_"~ "$_" && exit 1
dune_release_pkgs='cryptokit'
%ocaml_dune_setup
%ocaml_dune_build

%install
%ocaml_dune_install
%ocaml_create_file_list

%check
%ocaml_dune_test

%files -f %name.files
%doc README.md

%files devel -f %name.files.devel

%changelog
openSUSE Build Service is sponsored by