Blame ocaml-tyxml.spec

96eef89
%ifnarch %{ocaml_native_compiler}
96eef89
%global debug_package %{nil}
96eef89
%endif
96eef89
96eef89
%global srcname tyxml
96eef89
96eef89
Name:           ocaml-%{srcname}
96eef89
Version:        4.3.0
d62e29d
Release:        7%{?dist}
96eef89
Summary:        Build valid HTML and SVG documents
96eef89
96eef89
License:        LGPLv2 with exceptions
96eef89
URL:            https://ocsigen.org/tyxml/
96eef89
Source0:        https://github.com/ocsigen/tyxml/releases/download/%{version}/%{srcname}-%{version}.tbz
96eef89
7394c6a
# Temporary workaround for
7394c6a
# https://github.com/ocsigen/tyxml/issues/266
7394c6a
Patch1:         tyxml-4.3.0-ocaml-4.11-ignore-deprecated.patch
7394c6a
96eef89
BuildRequires:  ocaml >= 4.02
96eef89
BuildRequires:  ocaml-alcotest-devel
96eef89
BuildRequires:  ocaml-astring-devel
96eef89
BuildRequires:  ocaml-dune
96eef89
BuildRequires:  ocaml-findlib
96eef89
BuildRequires:  ocaml-markup-devel >= 0.7.2
96eef89
BuildRequires:  ocaml-ocamldoc
96eef89
BuildRequires:  ocaml-ppx-derivers-devel
96eef89
BuildRequires:  ocaml-ppx-tools-versioned-devel
bf0ad1a
BuildRequires:  ocaml-re-devel >= 1.5.0
96eef89
BuildRequires:  ocaml-seq-devel
96eef89
BuildRequires:  ocaml-uuidm-devel
bf0ad1a
BuildRequires:  ocaml-uutf-devel >= 1.0.0
96eef89
96eef89
%description
96eef89
TyXML provides a set of convenient combinators that uses the OCaml type
96eef89
system to ensure the validity of the generated documents.  TyXML can be
96eef89
used with any representation of HTML and SVG: the textual one, provided
96eef89
directly by this package, or DOM trees (`js_of_ocaml-tyxml`), virtual DOM
96eef89
(`virtual-dom`) and reactive or replicated trees (`eliom`).  You can also
96eef89
create your own representation and use it to instantiate a new set of
96eef89
combinators.
96eef89
96eef89
%package        devel
96eef89
Summary:        Development files for %{name}
96eef89
Requires:       %{name}%{?_isa} = %{version}-%{release}
bf0ad1a
Requires:       ocaml-re-devel%{?_isa}
96eef89
Requires:       ocaml-seq-devel%{?_isa}
bf0ad1a
Requires:       ocaml-uutf-devel%{?_isa}
96eef89
96eef89
%description    devel
96eef89
The %{name}-devel package contains libraries and signature files for
96eef89
developing applications that use %{name}.
96eef89
96eef89
%package        doc
96eef89
Summary:        HTML documentation for %{name}
96eef89
BuildArch:      noarch
96eef89
96eef89
%description    doc
96eef89
HTML documentation for %{name}.
96eef89
96eef89
%package        ppx
96eef89
Summary:        PPX for writing TyXML documents with HTML syntax
96eef89
Requires:       %{name}%{?_isa} = %{version}-%{release}
96eef89
96eef89
%description    ppx
96eef89
This package contains PPX for writing TyXML documents with HTML syntax.
96eef89
96eef89
  open Tyxml
96eef89
  let%%html to_ocaml = "OCaml!"
96eef89
96eef89
The TyXML PPX is compatible with all TyXML instance, from textual trees
96eef89
to reactive virtual DOM trees.
96eef89
96eef89
%package        ppx-devel
96eef89
Summary:        Development files for %{name}-ppx
96eef89
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
96eef89
Requires:       %{name}-ppx%{?_isa} = %{version}-%{release}
96eef89
Requires:       ocaml-markup-devel%{?_isa}
bf0ad1a
Requires:       ocaml-ppx-derivers-devel%{?_isa}
bf0ad1a
Requires:       ocaml-ppx-tools-versioned-devel%{?_isa}
96eef89
96eef89
%description    ppx-devel
96eef89
The %{name}-ppx-devel package contains libraries and signature files for
96eef89
developing applications that use %{name}-ppx.
96eef89
96eef89
%prep
7394c6a
%autosetup -n %{srcname}-%{version} -p1
96eef89
96eef89
# Fix typo in 4.3.0; fixed upstream, so remove this when updating
96eef89
sed -i 's/onmousdown/onmousedown/' lib/svg_f.ml
96eef89
96eef89
# Fix deprecation warning treated as an error by dune.
96eef89
# Fixed upstream after the 4.3.0 release; remove this when updating
96eef89
sed -i 's/Re\.get/Re.Group.get/' ppx/tyxml_ppx.ml
96eef89
96eef89
%build
bf0ad1a
dune build %{?_smp_mflags}
96eef89
96eef89
# Build the documentation.
96eef89
mkdir html
96eef89
ocamldoc -html -d html \
96eef89
  -colorize-code -short-functors -charset utf-8 -intro docs/indexdoc \
96eef89
  -I _build/install/default/lib/tyxml \
96eef89
  -I _build/install/default/lib/tyxml/functor \
96eef89
  -I _build/install/default/lib/tyxml/tools \
96eef89
  _build/install/default/lib/tyxml/*.mli \
96eef89
  _build/install/default/lib/tyxml/functor/*.mli \
96eef89
  _build/install/default/lib/tyxml/tools/*.mli
96eef89
96eef89
%install
96eef89
dune install --destdir=%{buildroot}
96eef89
96eef89
# We install the documentation with the doc macro
96eef89
rm -fr %{buildroot}%{_prefix}/doc
96eef89
96eef89
%ifarch %{ocaml_native_compiler}
96eef89
# Add missing executable bits
96eef89
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
96eef89
%endif
96eef89
96eef89
%check
96eef89
dune runtest
96eef89
96eef89
%files
96eef89
%doc CHANGES.md README.md
96eef89
%license LICENSE
96eef89
%dir %{_libdir}/ocaml/%{srcname}/
96eef89
%dir %{_libdir}/ocaml/%{srcname}/functor/
96eef89
%dir %{_libdir}/ocaml/%{srcname}/tools/
96eef89
%dir %{_libdir}/ocaml/%{srcname}/top/
96eef89
%{_libdir}/ocaml/%{srcname}/META
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cma
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmi
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cma
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmi
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cma
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cmi
96eef89
%ifarch %{ocaml_native_compiler}
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmxs
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmxs
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cmxs
96eef89
%endif
96eef89
96eef89
%files devel
96eef89
%{_libdir}/ocaml/%{srcname}/dune-package
96eef89
%{_libdir}/ocaml/%{srcname}/opam
96eef89
%ifarch %{ocaml_native_compiler}
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.a
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmxa
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.a
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmxa
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.a
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cmxa
96eef89
%endif
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.ml
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.ml
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.mli
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.ml
96eef89
%{_libdir}/ocaml/%{srcname}/tools/*.mli
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/top/*.ml
96eef89
96eef89
%files ppx
96eef89
%dir %{_libdir}/ocaml/%{srcname}-ppx/
96eef89
%dir %{_libdir}/ocaml/%{srcname}-ppx/internal/
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/META
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/ppx.exe
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cma
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cmi
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cma
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmi
96eef89
%ifarch %{ocaml_native_compiler}
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cmxs
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmxs
96eef89
%endif
96eef89
96eef89
%files ppx-devel
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/dune-package
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/opam
96eef89
%ifarch %{ocaml_native_compiler}
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.a
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cmxa
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.a
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmx
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmxa
96eef89
%endif
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/%{srcname}*.ml
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.ml
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.mli
96eef89
96eef89
%files doc
96eef89
%doc html/*
96eef89
%license LICENSE
96eef89
96eef89
%changelog
d62e29d
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 4.3.0-7
d62e29d
- OCaml 4.11.0+dev2-2020-04-22 rebuild
d62e29d
5efa9ec
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 4.3.0-6
5efa9ec
- OCaml 4.11.0 pre-release attempt 2
5efa9ec
3c44d02
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 4.3.0-5
3c44d02
- Update all OCaml dependencies for RPM 4.16.
3c44d02
99d2cc2
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 4.3.0-4
99d2cc2
- OCaml 4.10.0 final.
99d2cc2
7dd883f
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-3
7dd883f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7dd883f
bf0ad1a
* Thu Jan 16 2020 Jerry James <loganjerry@gmail.com> - 4.3.0-2
bf0ad1a
- Add ocaml-re-dvel and ocaml-uutf-devel Rs to -devel
bf0ad1a
- Add ocaml-ppx-derivers-devel and ocaml-ppx-tools-versioned-devel Rs to
bf0ad1a
  -ppx-devel
bf0ad1a
- Build in parallel
bf0ad1a
96eef89
* Fri Jan 10 2020 Jerry James <loganjerry@gmail.com> - 4.3.0-1
96eef89
- Initial RPM