From 3eca5f5ac733c20aaed5c4f29dd7d1f7f743ac56 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 9 Jun 2022 14:42:27 -0600 Subject: [PATCH] Fix the Source0 URL - chrpath is no longer needed - Use the %license macro - Build the test binaries so the tests will run --- ocaml.spec | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/ocaml.spec b/ocaml.spec index 59efada..8728970 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -40,9 +40,9 @@ Summary: OCaml compiler and programming environment License: QPL and (LGPLv2+ with exceptions) -URL: http://www.ocaml.org +URL: https://www.ocaml.org -Source0: https://github.com/ocaml/ocaml/archive/%%{version}.tar.gz +Source0: https://github.com/ocaml/ocaml/archive/%{version}/%{name}-%{version}.tar.gz # IMPORTANT NOTE: # @@ -75,7 +75,6 @@ BuildRequires: gawk BuildRequires: perl-interpreter BuildRequires: util-linux BuildRequires: /usr/bin/annocheck -BuildRequires: chrpath # ocamlopt runs gcc to link binaries. Because Fedora includes # hardening flags automatically, redhat-rpm-config is also required. @@ -85,9 +84,9 @@ Requires: redhat-rpm-config # Because we pass -c flag to ocaml-find-requires (to avoid circular # dependencies) we also have to explicitly depend on the right version # of ocaml-runtime. -Requires: ocaml-runtime = %{version}-%{release} +Requires: ocaml-runtime%{?_isa} = %{version}-%{release} -# Bundles an MD5 implementation in byterun/md5.{c,h} +# Bundles an MD5 implementation in runtime/caml/md5.h and runtime/md5.c Provides: bundled(md5-plumb) Provides: ocaml(compiler) = %{version} @@ -121,7 +120,7 @@ bytecode. %package source Summary: Source code for OCaml libraries -Requires: ocaml = %{version}-%{release} +Requires: ocaml%{?_isa} = %{version}-%{release} %description source Source code for OCaml libraries. @@ -129,8 +128,8 @@ Source code for OCaml libraries. %package ocamldoc Summary: Documentation generator for OCaml -Requires: ocaml = %{version}-%{release} -Provides: ocamldoc +Requires: ocaml%{?_isa} = %{version}-%{release} +Provides: ocamldoc = %{version} %description ocamldoc Documentation generator for OCaml. @@ -150,7 +149,7 @@ This package contains man pages. %package compiler-libs Summary: Compiler libraries for OCaml -Requires: ocaml = %{version}-%{release} +Requires: ocaml%{?_isa} = %{version}-%{release} %description compiler-libs @@ -211,12 +210,14 @@ annocheck -v hello ||: %endif %ifarch %{test_arches} -cd testsuite - +make ocamltest +%ifarch %{ocaml_native_compiler} +make ocamltest.opt +%endif %ifarch %{test_arches_required} -make -j1 all +make -j1 tests %else -make -j1 all ||: +make -j1 tests ||: %endif %endif @@ -227,9 +228,6 @@ perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf echo %{version} > $RPM_BUILD_ROOT%{_libdir}/ocaml/fedora-ocaml-release -# Remove rpaths from stublibs .so files. -chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so - find $RPM_BUILD_ROOT -name .ignore -delete # Remove this file. It's only created in certain situations and it's @@ -238,7 +236,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %files -%doc LICENSE +%license LICENSE %{_bindir}/ocaml %{_bindir}/ocamlcmt @@ -319,7 +317,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %files runtime -%doc README.adoc LICENSE Changes +%doc README.adoc Changes +%license LICENSE %{_bindir}/ocamlrun %{_bindir}/ocamlrund %{_bindir}/ocamlruni @@ -338,14 +337,14 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %files source -%doc LICENSE +%license LICENSE %{_libdir}/ocaml/*.ml %{_libdir}/ocaml/*.cmt* %{_libdir}/ocaml/*/*.cmt* %files ocamldoc -%doc LICENSE +%license LICENSE %doc ocamldoc/Changes.txt %{_bindir}/ocamldoc* %{_libdir}/ocaml/ocamldoc @@ -357,7 +356,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %files compiler-libs -%doc LICENSE +%license LICENSE %dir %{_libdir}/ocaml/compiler-libs %{_libdir}/ocaml/compiler-libs/*.mli %{_libdir}/ocaml/compiler-libs/*.cmi @@ -372,6 +371,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %changelog +* Thu Jun 9 2022 Jerry James - 4.13.1-4 +- Fix the Source0 URL +- chrpath is no longer needed +- Use the %%license macro +- Build the test binaries so the tests will run + * Fri Feb 04 2022 Richard W.M. Jones - 4.13.1-4 - Rebuild 4.13.1 to remove package notes