| |
@@ -1,19 +1,17 @@
|
| |
Name: ocaml-pcre
|
| |
- Version: 7.2.3
|
| |
- Release: 36%{?dist}
|
| |
+ Version: 7.5.0
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Perl compatibility regular expressions (PCRE) for OCaml
|
| |
|
| |
- License: LGPLv2
|
| |
+ License: LGPLv2 with exceptions
|
| |
URL: https://github.com/mmottl/pcre-ocaml/
|
| |
- Source0: https://github.com/mmottl/pcre-ocaml/releases/download/v%{version}/pcre-ocaml-%{version}.tar.gz
|
| |
+ Source0: %{url}/releases/download/%{version}/pcre-%{version}.tbz
|
| |
|
| |
- BuildRequires: make
|
| |
- BuildRequires: ocaml >= 3.12.1-3
|
| |
- BuildRequires: ocaml-findlib-devel
|
| |
+ BuildRequires: ocaml >= 4.12
|
| |
+ BuildRequires: ocaml-dune-devel >= 2.7
|
| |
+ BuildRequires: ocaml-odoc
|
| |
+ BuildRequires: ocaml-result-devel
|
| |
BuildRequires: pcre-devel
|
| |
- BuildRequires: gawk
|
| |
- BuildRequires: ocaml-ocamldoc
|
| |
- BuildRequires: ocaml-ocamlbuild
|
| |
|
| |
|
| |
%description
|
| |
@@ -22,9 +20,8 @@
|
| |
|
| |
%package devel
|
| |
Summary: Development files for %{name}
|
| |
- Requires: %{name} = %{version}-%{release}
|
| |
- # This isn't quite right - we need to specify same architecture of pcre-devel
|
| |
- Requires: pcre-devel
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+ Requires: pcre-devel%{?_isa}
|
| |
|
| |
|
| |
%description devel
|
| |
@@ -33,49 +30,70 @@
|
| |
|
| |
|
| |
%prep
|
| |
- %setup -q -n pcre-ocaml-%{version}
|
| |
- ./configure \
|
| |
- --prefix %{_prefix} \
|
| |
- --docdir %{_docdir} \
|
| |
- --destdir $RPM_BUILD_ROOT
|
| |
+ %autosetup -n pcre-%{version}
|
| |
|
| |
|
| |
%build
|
| |
- make all
|
| |
+ dune build %{?_smp_mflags} --verbose --profile release
|
| |
+ dune build %{?_smp_mflags} @doc
|
| |
+
|
| |
+ # Relink the stublib with Fedora flags
|
| |
+ cd _build/default/src
|
| |
+ ocamlmklib -g -ldopt "%{build_ldflags}" -o pcre_stubs $(ar t libpcre_stubs.a)
|
| |
+ cd -
|
| |
|
| |
|
| |
%install
|
| |
- export DESTDIR=$RPM_BUILD_ROOT
|
| |
- export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
| |
- mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
| |
- make install
|
| |
+ dune install --destdir=%{buildroot}
|
| |
+
|
| |
+ # We do not want the dune markers
|
| |
+ find _build/default/_doc/_html -name .dune-keep -delete
|
| |
+
|
| |
+ # We do not want the ml files
|
| |
+ find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
|
| |
|
| |
- # Installs API docs in %{_docdir}/api. Install this using %doc instead.
|
| |
- mv $RPM_BUILD_ROOT%{_docdir}/api .
|
| |
+ # We install the documentation with the doc macro
|
| |
+ rm -fr %{buildroot}%{_prefix}/doc
|
| |
+
|
| |
+
|
| |
+ %check
|
| |
+ dune runtest --profile release
|
| |
|
| |
|
| |
%files
|
| |
- %doc COPYING.txt
|
| |
- %{_libdir}/ocaml/pcre
|
| |
+ %doc CHANGES.md README.md
|
| |
+ %license LICENSE.md
|
| |
+ %dir %{_libdir}/ocaml/pcre/
|
| |
+ %{_libdir}/ocaml/pcre/META
|
| |
+ %{_libdir}/ocaml/pcre/*.cma
|
| |
+ %{_libdir}/ocaml/pcre/*.cmi
|
| |
%ifarch %{ocaml_native_compiler}
|
| |
- %exclude %{_libdir}/ocaml/pcre/*.a
|
| |
- %exclude %{_libdir}/ocaml/pcre/*.cmxa
|
| |
+ %{_libdir}/ocaml/pcre/*.cmxs
|
| |
%endif
|
| |
- %exclude %{_libdir}/ocaml/pcre/*.mli
|
| |
- %{_libdir}/ocaml/stublibs/*.so
|
| |
- %{_libdir}/ocaml/stublibs/*.so.owner
|
| |
+ %{_libdir}/ocaml/stublibs/dllpcre_stubs.so
|
| |
|
| |
|
| |
%files devel
|
| |
- %doc COPYING.txt README.md api
|
| |
+ %doc _build/default/_doc/*
|
| |
+ %{_libdir}/ocaml/pcre/dune-package
|
| |
+ %{_libdir}/ocaml/pcre/opam
|
| |
%ifarch %{ocaml_native_compiler}
|
| |
%{_libdir}/ocaml/pcre/*.a
|
| |
+ %{_libdir}/ocaml/pcre/*.cmx
|
| |
%{_libdir}/ocaml/pcre/*.cmxa
|
| |
%endif
|
| |
+ %{_libdir}/ocaml/pcre/*.cmt
|
| |
+ %{_libdir}/ocaml/pcre/*.cmti
|
| |
%{_libdir}/ocaml/pcre/*.mli
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Mon Dec 26 2021 Jerry James <loganjerry@gmail.com> - 7.5.0-1
|
| |
+ - Version 7.5.0
|
| |
+ - Clarify that license includes the OCaml exception
|
| |
+ - Build with dune
|
| |
+ - Add %%check script
|
| |
+
|
| |
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 7.2.3-36
|
| |
- OCaml 4.13.1 build
|
| |
|
| |
Also:
- Clarify that license includes the OCaml exception
- Build with dune
- Add %check script
As noted on the OCaml mailing list recently, I would like to update some OCaml packages, including this one. If this pull request looks good to you, go ahead and merge it, but please do not start a build at this time. I will build all of the listed packages in a side tag to avoid Rawhide breakage. The affected packages can all be seen in a COPR repository.
Let me know if you want any changes to this pull request.