2020-01-14 15:09:30 +00:00
|
|
|
%ifnarch %{ocaml_native_compiler}
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%global srcname markup
|
|
|
|
|
|
|
|
Name: ocaml-%{srcname}
|
2020-10-23 15:20:01 +00:00
|
|
|
Version: 1.0.0
|
2020-12-02 15:29:22 +00:00
|
|
|
Release: 2%{?dist}
|
2020-01-14 15:09:30 +00:00
|
|
|
Summary: Error-recovering streaming HTML5 and XML parsers for OCaml
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
URL: http://aantron.github.io/markup.ml/
|
|
|
|
Source0: https://github.com/aantron/markup.ml/archive/%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
BuildRequires: ocaml >= 4.02.0
|
2020-04-16 21:35:14 +00:00
|
|
|
BuildRequires: ocaml-bisect-ppx-devel >= 2.0.0
|
2020-12-02 15:29:22 +00:00
|
|
|
BuildRequires: ocaml-dune >= 2.7.0
|
2020-01-14 15:09:30 +00:00
|
|
|
BuildRequires: ocaml-lwt-devel
|
|
|
|
BuildRequires: ocaml-ocamldoc
|
|
|
|
BuildRequires: ocaml-ounit-devel
|
|
|
|
BuildRequires: ocaml-uutf-devel >= 1.0.0
|
|
|
|
|
|
|
|
%description
|
|
|
|
Markup.ml is a pair of parsers implementing the HTML5 and XML
|
|
|
|
specifications, including error recovery. Usage is simple, because each
|
|
|
|
parser is a function from byte streams to parsing signal streams.
|
|
|
|
|
|
|
|
In addition to being error-correcting, the parsers are:
|
|
|
|
- **streaming**: parsing partial input and emitting signals while more
|
|
|
|
input is still being received;
|
|
|
|
- **lazy**: not parsing input unless you have requested the next parsing
|
|
|
|
signal, so you can easily stop parsing part-way through a document;
|
|
|
|
- **non-blocking**: they can be used with Lwt, but still provide a
|
|
|
|
straightforward synchronous interface for simple usage; and
|
|
|
|
- **one-pass**: memory consumption is limited since the parsers don't
|
|
|
|
build up a document representation, nor buffer input beyond a small
|
|
|
|
amount of lookahead.
|
|
|
|
|
|
|
|
The parsers detect character encodings automatically, and emit everything
|
|
|
|
in UTF-8. The HTML parser understands SVG and MathML, in addition to
|
|
|
|
HTML5.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2020-01-16 18:45:50 +00:00
|
|
|
Requires: ocaml-uutf-devel%{?_isa}
|
2020-01-14 15:09:30 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
%package lwt
|
|
|
|
Summary: Adapter between ocaml-markup and ocaml-lwt
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description lwt
|
|
|
|
This package contains an adapter between Markup.ml and Lwt.
|
|
|
|
|
|
|
|
%package lwt-devel
|
|
|
|
Summary: Development files for %{name}-lwt
|
|
|
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: %{name}-lwt%{?_isa} = %{version}-%{release}
|
2020-01-16 18:45:50 +00:00
|
|
|
Requires: ocaml-bisect-ppx-devel%{?_isa}
|
2020-01-14 15:09:30 +00:00
|
|
|
Requires: ocaml-lwt-devel%{?_isa}
|
|
|
|
|
|
|
|
%description lwt-devel
|
|
|
|
The %{name}-lwt-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}-lwt.
|
|
|
|
|
|
|
|
%prep
|
2020-02-26 18:48:28 +00:00
|
|
|
%autosetup -n %{srcname}.ml-%{version} -p1
|
2020-01-14 15:09:30 +00:00
|
|
|
|
|
|
|
# The uchar package is a forward compatibility package for OCaml versions prior
|
|
|
|
# to 4.03. We have a later OCaml in Fedora; uchar is in the standard library.
|
|
|
|
# Nothing in this package directly refers to uchar (only indirectly via uutf),
|
|
|
|
# so just remove the reference to it.
|
|
|
|
sed -i '/uchar/d' markup.opam
|
|
|
|
|
|
|
|
%build
|
2020-12-02 15:29:22 +00:00
|
|
|
dune build %{?_smp_mflags} @install
|
2020-01-14 15:09:30 +00:00
|
|
|
|
|
|
|
# Build the documentation. Unfortunately, ocamldoc is not smart enough to
|
|
|
|
# figure out that Kstream is Markup.Kstream. I have not been able to figure
|
|
|
|
# out how to convince it, so the temporary hacked-up copy of markup.mli is
|
2020-04-16 21:35:14 +00:00
|
|
|
# my way of working around the problem. We should really build documentation
|
|
|
|
# with odoc, but this package is a build dependency of odoc.
|
2020-01-14 15:09:30 +00:00
|
|
|
mkdir tmp
|
|
|
|
sed '/Kstream/d' _build/default/src/markup.mli > tmp/markup.mli
|
|
|
|
|
|
|
|
mkdir html
|
|
|
|
ocamldoc -html -d html -css-style doc/style.css -I +lwt -I +lwt/unix \
|
|
|
|
-I _build/install/default/lib/markup \
|
|
|
|
-I _build/install/default/lib/markup-lwt \
|
|
|
|
-I _build/install/default/lib/markup-lwt/unix \
|
|
|
|
tmp/markup.mli \
|
|
|
|
_build/default/src/lwt/markup_lwt.mli \
|
|
|
|
_build/default/src/lwt_unix/markup_lwt_unix.mli
|
|
|
|
|
|
|
|
%install
|
|
|
|
dune install --destdir=%{buildroot}
|
|
|
|
|
|
|
|
# We install the documentation with the doc macro
|
|
|
|
rm -fr %{buildroot}%{_prefix}/doc
|
|
|
|
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
# Add missing executable bits
|
|
|
|
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
2020-10-23 15:20:01 +00:00
|
|
|
dune runtest
|
2020-01-14 15:09:30 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE.md
|
|
|
|
%dir %{_libdir}/ocaml/%{srcname}/
|
|
|
|
%{_libdir}/ocaml/%{srcname}/META
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%doc html/*
|
|
|
|
%{_libdir}/ocaml/%{srcname}/dune-package
|
|
|
|
%{_libdir}/ocaml/%{srcname}/opam
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
|
|
|
|
%endif
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
|
|
|
|
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
|
|
|
|
%{_libdir}/ocaml/%{srcname}/*.ml
|
|
|
|
%{_libdir}/ocaml/%{srcname}/*.mli
|
|
|
|
|
|
|
|
%files lwt
|
|
|
|
%dir %{_libdir}/ocaml/%{srcname}-lwt/
|
|
|
|
%dir %{_libdir}/ocaml/%{srcname}-lwt/unix/
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/META
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cma
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmi
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cma
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmi
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmxs
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmxs
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files lwt-devel
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/dune-package
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/opam
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.a
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmx
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmxa
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.a
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmx
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmxa
|
|
|
|
%endif
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmt
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.cmti
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.ml
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/%{srcname}_lwt.mli
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmt
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.cmti
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.ml
|
|
|
|
%{_libdir}/ocaml/%{srcname}-lwt/unix/%{srcname}_lwt_unix.mli
|
|
|
|
|
|
|
|
%changelog
|
2020-12-02 15:29:22 +00:00
|
|
|
* Wed Dec 2 2020 Jerry James <loganjerry@gmail.com> - 1.0.0-2
|
|
|
|
- Upstream re-released version 1.0.0
|
|
|
|
|
2020-10-23 15:20:01 +00:00
|
|
|
* Fri Oct 23 2020 Jerry James <loganjerry@gmail.com> - 1.0.0-1
|
|
|
|
- Version 1.0.0
|
|
|
|
|
2020-09-01 20:37:07 +00:00
|
|
|
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-12
|
|
|
|
- OCaml 4.11.1 rebuild
|
|
|
|
|
2020-08-21 18:15:14 +00:00
|
|
|
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-11
|
|
|
|
- OCaml 4.11.0 rebuild
|
|
|
|
|
2020-08-01 06:38:47 +00:00
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-10
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-28 12:11:56 +00:00
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-9
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-05-05 13:36:16 +00:00
|
|
|
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-8
|
|
|
|
- OCaml 4.11.0+dev2-2020-04-22 rebuild
|
|
|
|
|
2020-04-21 21:21:15 +00:00
|
|
|
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-7
|
|
|
|
- OCaml 4.11.0 pre-release attempt 2
|
|
|
|
|
2020-04-04 09:21:58 +00:00
|
|
|
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-6
|
|
|
|
- Update all OCaml dependencies for RPM 4.16.
|
|
|
|
|
2020-02-26 18:33:53 +00:00
|
|
|
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.2-5
|
|
|
|
- OCaml 4.10.0 final.
|
|
|
|
|
2020-01-29 19:38:09 +00:00
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2020-01-22 23:58:25 +00:00
|
|
|
* Wed Jan 22 2020 Jerry James <loganjerry@gmail.com> - 0.8.2-3
|
|
|
|
- OCaml 4.10.0+beta1 rebuild.
|
|
|
|
|
2020-01-16 18:45:50 +00:00
|
|
|
* Thu Jan 16 2020 Jerry James <loganjerry@gmail.com> - 0.8.2-2
|
|
|
|
- Add ocaml-uutf-devel R to -devel
|
|
|
|
- Add ocaml-bisect-ppx-devel R to -lwt-devel
|
|
|
|
- Build in parallel
|
|
|
|
|
2020-01-14 15:09:30 +00:00
|
|
|
* Fri Jan 10 2020 Jerry James <loganjerry@gmail.com> - 0.8.2-1
|
|
|
|
- Initial RPM
|