Blame ocaml-tyxml.spec

96eef89
%ifnarch %{ocaml_native_compiler}
96eef89
%global debug_package %{nil}
96eef89
%endif
96eef89
96eef89
%global srcname tyxml
96eef89
939f121
# This package is needed to build ocaml-odoc, but ocaml-odoc is needed to build
939f121
# documentation for this package.  Skip building documentation for now until we
939f121
# develop a strategy for handling dependency loops.
939f121
96eef89
Name:           ocaml-%{srcname}
939f121
Version:        4.4.0
4dababe
Release:        6%{?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-dune
96eef89
BuildRequires:  ocaml-markup-devel >= 0.7.2
96eef89
BuildRequires:  ocaml-ppx-tools-versioned-devel
bf0ad1a
BuildRequires:  ocaml-re-devel >= 1.5.0
96eef89
BuildRequires:  ocaml-seq-devel
bf0ad1a
BuildRequires:  ocaml-uutf-devel >= 1.0.0
96eef89
939f121
# See comment above about dependency loops.  If the issue is not resolved by
939f121
# Fedora 36, this can be removed.
939f121
Obsoletes:      %{name}-doc < 4.4.0-1
939f121
Provides:       %{name}-doc = %{version}-%{release}
939f121
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
939f121
%package        syntax
939f121
Summary:        Common layer for the JSX and PPX syntaxes for TyXML
939f121
939f121
%description    syntax
939f121
This package contains common code used by both the JSX and the PPX
939f121
syntaxes for TyXML.
939f121
939f121
%package        syntax-devel
939f121
Summary:        Development files for %{name}-syntax
939f121
Requires:       %{name}-syntax%{?_isa} = %{version}-%{release}
939f121
Requires:       ocaml-ppx-tools-versioned-devel%{?_isa}
939f121
939f121
%description    syntax-devel
939f121
The %{name}-syntax-devel package contains libraries and signature files
939f121
for developing applications that use %{name}-syntax.
939f121
939f121
%package        jsx
939f121
Summary:        JSX syntax for writing TyXML documents
939f121
Requires:       %{name}%{?_isa} = %{version}-%{release}
939f121
Requires:       %{name}-syntax%{?_isa} = %{version}-%{release}
939f121
939f121
%description    jsx
939f121
This package enables writing TyXML documents with reasons's JSX syntax,
939f121
from textual trees to reactive virtual DOM trees.
96eef89
939f121
  open Tyxml
939f121
  let to_ocaml =  "OCaml!" ;
939f121
939f121
%package        jsx-devel
939f121
Summary:        Development files for %{name}-jsx
939f121
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
939f121
Requires:       %{name}-syntax-devel%{?_isa} = %{version}-%{release}
939f121
Requires:       %{name}-jsx%{?_isa} = %{version}-%{release}
939f121
Requires:       ocaml-ppx-tools-versioned-devel%{?_isa}
939f121
939f121
%description    jsx-devel
7254bca
The %{name}-jsx-devel package contains libraries and signature files for
939f121
developing applications that use %{name}-jsx.
96eef89
96eef89
%package        ppx
96eef89
Summary:        PPX for writing TyXML documents with HTML syntax
96eef89
Requires:       %{name}%{?_isa} = %{version}-%{release}
939f121
Requires:       %{name}-syntax%{?_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}
939f121
Requires:       %{name}-syntax-devel%{?_isa} = %{version}-%{release}
96eef89
Requires:       %{name}-ppx%{?_isa} = %{version}-%{release}
96eef89
Requires:       ocaml-markup-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
%build
bf0ad1a
dune build %{?_smp_mflags}
96eef89
96eef89
%install
96eef89
dune install --destdir=%{buildroot}
96eef89
939f121
# We do not want the ml files
939f121
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
939f121
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
939f121
# As of version 4.4.0, the tests fail due to lack of the reason package in
939f121
# Fedora.  Tests are disabled until we can figure out how to work around that.
939f121
939f121
#%%check
939f121
#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
%{_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
%ifarch %{ocaml_native_compiler}
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.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
%endif
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}/functor/*.mli
939f121
939f121
%files syntax
939f121
%dir %{_libdir}/ocaml/%{srcname}-syntax/
939f121
%{_libdir}/ocaml/%{srcname}-syntax/META
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cma
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmi
939f121
%ifarch %{ocaml_native_compiler}
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmxs
939f121
%endif
939f121
939f121
%files syntax-devel
939f121
%{_libdir}/ocaml/%{srcname}-syntax/dune-package
939f121
%{_libdir}/ocaml/%{srcname}-syntax/opam
939f121
%ifarch %{ocaml_native_compiler}
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.a
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmx
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmxa
939f121
%endif
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmt
939f121
%{_libdir}/ocaml/%{srcname}-syntax/%{srcname}*.cmti
939f121
%{_libdir}/ocaml/%{srcname}-syntax/*.mli
939f121
939f121
%files jsx
939f121
%dir %{_libdir}/ocaml/%{srcname}-jsx/
939f121
%{_libdir}/ocaml/%{srcname}-jsx/META
939f121
%{_libdir}/ocaml/%{srcname}-jsx/ppx.exe
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cma
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cmi
939f121
%ifarch %{ocaml_native_compiler}
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cmxs
939f121
%endif
939f121
939f121
%files jsx-devel
939f121
%{_libdir}/ocaml/%{srcname}-jsx/dune-package
939f121
%{_libdir}/ocaml/%{srcname}-jsx/opam
939f121
%ifarch %{ocaml_native_compiler}
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.a
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cmx
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cmxa
939f121
%endif
939f121
%{_libdir}/ocaml/%{srcname}-jsx/%{srcname}*.cmt
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/internal/*.cmt
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.cmti
96eef89
%{_libdir}/ocaml/%{srcname}-ppx/internal/*.mli
96eef89
96eef89
%changelog
4dababe
* Mon Dec  7 2020 Jerry James <loganjerry@gmail.com> - 4.4.0-6
4dababe
- Rebuild for ocaml-migrate-parsetree 1.8.0
4dababe
7762183
* Wed Dec  2 2020 Jerry James <loganjerry@gmail.com> - 4.4.0-5
7762183
- Rebuild for the re-release of ocaml-markup 1.0.0
7762183
7254bca
* Fri Oct 23 2020 Jerry James <loganjerry@gmail.com> - 4.4.0-4
7254bca
- Rebuild for ocaml-markup 1.0.0
7254bca
0fcfeaf
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-3
0fcfeaf
- OCaml 4.11.1 rebuild
0fcfeaf
6b2ba9b
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-2
6b2ba9b
- OCaml 4.11.0 rebuild
6b2ba9b
939f121
* Tue Aug  4 2020 Jerry James <loganjerry@gmail.com> - 4.4.0-1
939f121
- Version 4.4.0
939f121
- Drop documentation subpackage until dependency loop can be handled
939f121
- Disable tests since no reason package is available
939f121
75f5158
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-9
75f5158
- Second attempt - Rebuilt for
75f5158
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
75f5158
6f9aa65
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-8
6f9aa65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6f9aa65
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