The package rpms/ocaml-lwt.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-lwt.git/commit/?id=e5e86f64....
Change:
+%ifarch %{ocaml_native_compiler}
Thanks.
Full change:
============
commit e5e86f6436c127b21336786d652d38e0f974663d
Author: Jerry James <loganjerry(a)gmail.com>
Date: Thu Mar 5 08:29:03 2020 -0700
Link the stublib with RPM_LD_FLAGS.
Add the executable bit to cmxs files.
Require libev-devel from the devel subpackage.
Require ocaml-lwt-devel from ocaml-lwt-{react,ppx}-devel.
Refactor the %files lists.
Add an rpmlintrc file.
diff --git a/ocaml-lwt.rpmlintrc b/ocaml-lwt.rpmlintrc
new file mode 100644
index 0000000..d5aef5b
--- /dev/null
+++ b/ocaml-lwt.rpmlintrc
@@ -0,0 +1,9 @@
+# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
+#
https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_...
+
+# This word names a code feature; it is not an English word
+addFilter(r'W: spelling-error .* async')
+
+# This package gives access to both the chroot and chdir functions from OCaml.
+# It is up to consumers to call them together.
+addFilter(r'E: missing-call-to-chdir-with-chroot')
diff --git a/ocaml-lwt.spec b/ocaml-lwt.spec
index 3765d28..764ee28 100644
--- a/ocaml-lwt.spec
+++ b/ocaml-lwt.spec
@@ -1,6 +1,6 @@
Name: ocaml-lwt
Version: 5.1.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: OCaml lightweight thread library
# The openssl linking exception is granted.
@@ -13,8 +13,7 @@ Source0:
https://github.com/ocsigen/lwt/archive/%{version}/lwt-%{version}
Patch1: lwt-5.1.2-bytes.patch
BuildRequires: ocaml >= 4.02.0
-BuildRequires: ocaml-ocamlbuild
-BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-findlib
BuildRequires: dune
BuildRequires: ocaml-dune-devel
@@ -51,6 +50,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
# have it then any package that builds using LWT fails with:
# ocamlfind: Package `seq' not found - required by `lwt'
Requires: ocaml-seq-devel%{?_isa}
+Requires: libev-devel%{?_isa}
%description devel
The %{name}-devel package contains libraries and signature files for
@@ -67,6 +67,7 @@ Helpers for using React with Lwt.
Summary: Development files for ocaml-lwt-react
Requires: %{name}-react%{?_isa} = %{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description react-devel
The %{name}-react-devel package contains libraries and signature files for
@@ -83,6 +84,7 @@ PPX syntax for Lwt, providing something similar to async/await from
JavaScript.
Summary: Development files for ocaml-lwt-ppx
Requires: %{name}-ppx%{?_isa} = %{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description ppx-devel
The %{name}-ppx-devel package contains libraries and signature files for
@@ -116,6 +118,12 @@ sed 's,Sys.win32 && not is_wsl,Sys.unix,g' -i
test/unix/test_lwt_unix.cppo.ml
%build
dune build --profile=release --verbose
+# Relink the stublib with RPM_LD_FLAGS
+cd _build/default/src/unix
+ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -lev -lpthread -lm -o lwt_unix_stubs \
+ $(ar t liblwt_unix_stubs.a)
+cd -
+
%install
dune install --profile=release --destdir %{buildroot}
@@ -124,19 +132,31 @@ dune install --profile=release --destdir %{buildroot}
# Remove spurious jbuilder-installed documentation.
rm -rf %{buildroot}/%{_prefix}/doc
+%ifarch %{ocaml_native_compiler}
+# Add missing executable bits
+find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
+%endif
+
%check
dune runtest --profile=release
%files
%doc CHANGES README.md
%license LICENSE.md
-%{_libdir}/ocaml/lwt
+%dir %{_libdir}/ocaml/lwt/
+%dir %{_libdir}/ocaml/lwt/unix/
+%{_libdir}/ocaml/lwt/META
+%{_libdir}/ocaml/lwt/dune-package
+%{_libdir}/ocaml/lwt/opam
+%{_libdir}/ocaml/lwt/*.cma
+%{_libdir}/ocaml/lwt/*.cmi
+%{_libdir}/ocaml/lwt/unix/*.cma
+%{_libdir}/ocaml/lwt/unix/*.cmi
%ifarch %{ocaml_native_compiler}
-%exclude %{_libdir}/ocaml/lwt/*.a
-%exclude %{_libdir}/ocaml/lwt/*.cmxa
-%exclude %{_libdir}/ocaml/lwt/*.cmx
+%{_libdir}/ocaml/lwt/*.cmxs
+%{_libdir}/ocaml/lwt/unix/*.cmxs
%endif
-%exclude %{_libdir}/ocaml/lwt/*.mli
+%{_libdir}/ocaml/stublibs/*.so
%files devel
%doc CHANGES README.md
@@ -144,20 +164,32 @@ dune runtest --profile=release
%{_libdir}/ocaml/lwt/*.a
%{_libdir}/ocaml/lwt/*.cmxa
%{_libdir}/ocaml/lwt/*.cmx
+%{_libdir}/ocaml/lwt/unix/*.a
+%{_libdir}/ocaml/lwt/unix/*.cmxa
+%{_libdir}/ocaml/lwt/unix/*.cmx
%endif
+%{_libdir}/ocaml/lwt/*.cmt
+%{_libdir}/ocaml/lwt/*.cmti
+%{_libdir}/ocaml/lwt/*.ml
%{_libdir}/ocaml/lwt/*.mli
-%{_libdir}/ocaml/stublibs/*.so
+%{_libdir}/ocaml/lwt/unix/*.cmt
+%{_libdir}/ocaml/lwt/unix/*.cmti
+%{_libdir}/ocaml/lwt/unix/*.h
+%{_libdir}/ocaml/lwt/unix/*.ml
+%{_libdir}/ocaml/lwt/unix/*.mli
%files react
%doc CHANGES README.md
%license LICENSE.md
-%{_libdir}/ocaml/lwt_react
+%dir %{_libdir}/ocaml/lwt_react/
+%{_libdir}/ocaml/lwt_react/META
+%{_libdir}/ocaml/lwt_react/dune-package
+%{_libdir}/ocaml/lwt_react/opam
+%{_libdir}/ocaml/lwt_react/*.cma
+%{_libdir}/ocaml/lwt_react/*.cmi
%ifarch %{ocaml_native_compiler}
-%exclude %{_libdir}/ocaml/lwt_react/*.a
-%exclude %{_libdir}/ocaml/lwt_react/*.cmxa
-%exclude %{_libdir}/ocaml/lwt_react/*.cmx
+%{_libdir}/ocaml/lwt_react/*.cmxs
%endif
-%exclude %{_libdir}/ocaml/lwt/*.mli
%files react-devel
%doc CHANGES README.md
@@ -166,16 +198,22 @@ dune runtest --profile=release
%{_libdir}/ocaml/lwt_react/*.cmxa
%{_libdir}/ocaml/lwt_react/*.cmx
%endif
+%{_libdir}/ocaml/lwt_react/*.cmt
+%{_libdir}/ocaml/lwt_react/*.cmti
+%{_libdir}/ocaml/lwt_react/*.ml
%{_libdir}/ocaml/lwt_react/*.mli
%files ppx
-%{_libdir}/ocaml/lwt_ppx
+%dir %{_libdir}/ocaml/lwt_ppx/
+%{_libdir}/ocaml/lwt_ppx/META
+%{_libdir}/ocaml/lwt_ppx/dune-package
+%{_libdir}/ocaml/lwt_ppx/opam
+%{_libdir}/ocaml/lwt_ppx/ppx.exe
+%{_libdir}/ocaml/lwt_ppx/*.cma
+%{_libdir}/ocaml/lwt_ppx/*.cmi
%ifarch %{ocaml_native_compiler}
-%exclude %{_libdir}/ocaml/lwt_ppx/*.a
-%exclude %{_libdir}/ocaml/lwt_ppx/*.cmxa
-%exclude %{_libdir}/ocaml/lwt_ppx/*.cmx
+%{_libdir}/ocaml/lwt_ppx/*.cmxs
%endif
-%exclude %{_libdir}/ocaml/lwt_ppx/*.mli
%files ppx-devel
%doc CHANGES README.md
@@ -184,10 +222,20 @@ dune runtest --profile=release
%{_libdir}/ocaml/lwt_ppx/*.cmxa
%{_libdir}/ocaml/lwt_ppx/*.cmx
%endif
+%{_libdir}/ocaml/lwt_ppx/*.cmt
+%{_libdir}/ocaml/lwt_ppx/*.cmti
+%{_libdir}/ocaml/lwt_ppx/*.ml
%{_libdir}/ocaml/lwt_ppx/*.mli
%changelog
+* Thu Mar 5 2020 Jerry James <loganjerry(a)gmail.com> - 5.1.2-3
+- Link the stublib with RPM_LD_FLAGS
+- Add the executable bit to cmxs files
+- Require libev-devel from the devel subpackage
+- Require ocaml-lwt-devel from ocaml-lwt-{react,ppx}-devel
+- Refactor the %files lists
+
* Wed Feb 26 2020 Richard W.M. Jones <rjones(a)redhat.com> - 5.1.2-2
- OCaml 4.10.0 final.