The package rpms/ocaml-cryptokit.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ocaml-cryptokit.git/commit/?id=19....
Change:
+%ifarch %{ocaml_native_compiler}
Thanks.
Full change:
============
commit 19c9a252b35193cdc6c1a13ec8baca036ec07fc0
Author: Jerry James <loganjerry(a)gmail.com>
Date: Mon Nov 16 17:55:10 2020 -0700
Version 1.16.1, built with ocaml-zarith 1.11.
- New project and source URLs.
- Dune is now used to build.
- Add -doc subpackage.
diff --git a/.gitignore b/.gitignore
index a491315..3cf81cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ cryptokit-1.3.tar.gz
/cryptokit-1.6.tar.gz
/cryptokit-1.9.tar.gz
/cryptokit-1.11.tar.gz
+/cryptokit-1.16.1.tar.gz
diff --git a/ocaml-cryptokit.spec b/ocaml-cryptokit.spec
index 4398823..19ff8f5 100644
--- a/ocaml-cryptokit.spec
+++ b/ocaml-cryptokit.spec
@@ -1,22 +1,21 @@
-%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global srcname cryptokit
-Name: ocaml-cryptokit
-Version: 1.11
-Release: 30%{?dist}
+Name: ocaml-%{srcname}
+Version: 1.16.1
+Release: 1%{?dist}
Summary: OCaml library of cryptographic and hash functions
License: LGPLv2 with exceptions
-URL:
http://forge.ocamlcore.org/projects/cryptokit/
-Source0:
https://forge.ocamlcore.org/frs/download.php/1618/cryptokit-1.11.tar.gz
+%global upver %(tr -d . <<< %{version})
+URL:
https://github.com/xavierleroy/cryptokit/
+Source0: %{url}/archive/release%{upver}/%{srcname}-%{version}.tar.gz
-BuildRequires: ocaml
-BuildRequires: ocaml-ocamldoc
-BuildRequires: ocaml-ocamlbuild
-BuildRequires: ocaml-zarith-devel
-BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml >= 4.03.0
+BuildRequires: ocaml-dune-devel >= 2.0
+BuildRequires: ocaml-odoc
+BuildRequires: ocaml-zarith-devel >= 1.4
BuildRequires: zlib-devel
-BuildRequires: chrpath
%description
@@ -25,12 +24,13 @@ cryptographic primitives that can be used to implement cryptographic
protocols in security-sensitive applications. The primitives provided
include:
-* Symmetric-key cryptography: AES, DES, Triple-DES, ARCfour, in ECB,
- CBC, CFB and OFB modes.
+* Symmetric-key cryptography: AES, Chacha20, DES, Triple-DES, Blowfish,
+ ARCfour, in ECB, CBC, CFB OFB and counter modes.
* Public-key cryptography: RSA encryption and signature; Diffie-Hellman
key agreement.
-* Hash functions and MACs: SHA-1, SHA-256, RIPEMD-160, MD5, and MACs
- based on AES and DES.
+* Hash functions and MACs: SHA-3, SHA-2, BLAKE2b, RIPEMD-160, and MACs
+ based on AES and DES. (SHA-1 and MD5, despite being broken, are also
+ provided for historical value.)
* Random number generation.
* Encodings and compression: base 64, hexadecimal, Zlib compression.
@@ -44,7 +44,7 @@ transformations over character streams.
%package devel
Summary: Development files for %{name}
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
@@ -52,55 +52,93 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
+%package doc
+Summary: Interface documentation for %{name}
+BuildArch: noarch
+
+
+%description doc
+The %{name}-doc package contains interface documentation for
+%{name}.
+
+
%prep
-%setup -q -n cryptokit-%{version}
+%autosetup -n %{srcname}-release%{upver}
+
%build
-./configure --destdir $RPM_BUILD_ROOT
-# Some sort of circular dependency, so sometimes the first make fails.
-# Just run make twice.
-make ||:
-make
+# On x86 and x86_64, the configure script finds support for the -maes flag in
+# the compiler, and uses it to compile src/aesni.{c,h}. This is okay because
+# use of the compiled code is conditional. The function aesni_check_available()
+# is called first, which checks the CPUID to verify that the instructions exist
+# on the CPU. Therefore, older CPUs can still run the compiled code.
+dune build %{?_smp_mflags} @install
+dune build %{?_smp_mflags} @doc
-chrpath --delete _build/src/dllcryptokit_stubs.so
+# Relink the stublibs with Fedora flags
+cd _build/default/src
+ocamlmklib -g -ldopt "%build_ldflags" -o cryptokit_stubs \
+ $(ar t libcryptokit_stubs.a)
+cd -
%check
# This opens /dev/random but never reads from it.
-make test
+dune runtest
%install
-mkdir -p $RPM_BUILD_ROOT/%{_libdir}/ocaml
-mkdir -p $RPM_BUILD_ROOT/%{_libdir}/ocaml/stublibs
-export DESTDIR=$RPM_BUILD_ROOT
-export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT/%{_libdir}/ocaml
-make install
+dune install --destdir=%{buildroot}
+
+# We install the documentation with the doc macro
+rm -fr %{buildroot}%{_prefix}/doc
+
+# We do not want the ml files
+find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
+
+%ifarch %{ocaml_native_compiler}
+# Add missing executable bits
+find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
+%endif
%files
-%doc LICENSE.txt
-%{_libdir}/ocaml/cryptokit
-%if %opt
-%exclude %{_libdir}/ocaml/cryptokit/*.a
-%exclude %{_libdir}/ocaml/cryptokit/*.cmxa
-#%exclude %{_libdir}/ocaml/cryptokit/*.cmx
+%license LICENSE
+%dir %{_libdir}/ocaml/%{srcname}/
+%{_libdir}/ocaml/%{srcname}/*.cma
+%{_libdir}/ocaml/%{srcname}/*.cmi
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/%{srcname}/*.cmxs
%endif
-%exclude %{_libdir}/ocaml/cryptokit/*.mli
%{_libdir}/ocaml/stublibs/*.so*
%files devel
-%doc README.txt LICENSE.txt Changes
-%if %opt
-%{_libdir}/ocaml/cryptokit/*.a
-%{_libdir}/ocaml/cryptokit/*.cmxa
-#%{_libdir}/ocaml/cryptokit/*.cmx
+%doc README.md Changes
+%{_libdir}/ocaml/%{srcname}/dune-package
+%{_libdir}/ocaml/%{srcname}/META
+%{_libdir}/ocaml/%{srcname}/opam
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/%{srcname}/*.a
+%{_libdir}/ocaml/%{srcname}/*.cmx
+%{_libdir}/ocaml/%{srcname}/*.cmxa
%endif
-%{_libdir}/ocaml/cryptokit/*.mli
+%{_libdir}/ocaml/%{srcname}/*.cmt
+%{_libdir}/ocaml/%{srcname}/*.cmti
+%{_libdir}/ocaml/%{srcname}/*.mli
+
+
+%files doc
+%doc _build/default/_doc/*
%changelog
+* Mon Nov 16 2020 Jerry James <loganjerry(a)gmail.com> - 1.16.1-1
+- Version 1.16.1, built with ocaml-zarith 1.11
+- New project and source URLs
+- Dune is now used to build
+- Add -doc subpackage
+
* Fri Sep 25 2020 Jerry James <loganjerry(a)gmail.com> - 1.11-30
- Rebuild for ocaml-zarith 1.10
diff --git a/sources b/sources
index 0a513b4..e38a423 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-931f8240ad30d9930d0f584f2921de69 cryptokit-1.11.tar.gz
+SHA512 (cryptokit-1.16.1.tar.gz) =
28913a7c35ae951a4c464287acc511ee1bdc9d03b5928e2243c5ae5cbb8b10afe8e84d7a73ba6478ed62657d01fdb6f02472739255c33de3671c4130b659da52