%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-pa-do Version: 0.8.4 Release: 3%{?dist} Summary: OCaml syntax extension for delimited overloading Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://forge.ocamlcore.org/projects/pa-do/ Source0: http://forge.ocamlcore.org/frs/download.php/176/pa_do-%{version}.tar.gz # Both sent upstream 2009-03-17: Patch0: ocaml-pa-do-0.8.4-module-name-fix.patch Patch1: ocaml-pa-do-0.8.4-complex.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-omake # This package requires graphics.cmxa for some reason. BuildRequires: ocaml-x11 # For pdflatex, used to build the documentation. BuildRequires: texlive-latex %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh %description A syntax extension to ease the writing of efficient arithmetic expressions in OCaml. This package contains three syntax extensions. - pa_infix - pa_do (includes Delimited_overloading, Macros) - pa_do_nums %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q -n pa_do-%{version} %patch0 -p1 mv examples/ad-hoc-newton.ml examples/ad_hoc_newton.ml %patch1 -p1 %build omake --verbose omake doc %check omake test %install # These rules work if the library uses 'ocamlfind install' to install itself. rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs omake install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE %{_libdir}/ocaml/pa_do %if %opt %exclude %{_libdir}/ocaml/pa_do/*.cmx %endif %exclude %{_libdir}/ocaml/pa_do/*.mli %files devel %defattr(-,root,root,-) %doc README %if %opt %{_libdir}/ocaml/pa_do/*.cmx %endif %{_libdir}/ocaml/pa_do/*.mli %changelog * Tue Mar 17 2009 Richard W.M. Jones - 0.8.4-3 - Patch module name which is illegal in OCaml 3.11. - Patch complex tests. * Mon Mar 16 2009 Richard W.M. Jones - 0.8.4-2 - Add check section which runs the tests. - Don't duplicate LICENSE file in the -devel subpackage as well. * Mon Mar 16 2009 Richard W.M. Jones - 0.8.4-1 - New upstream version 0.8.4. - Use http URLs instead of https URLs. - Min version of OCaml required is 3.10, not 3.11. This will let us distribute on Fedora 10. * Sun Feb 8 2009 Richard W.M. Jones - 0.8.3-2 - New upstream version 0.8.3. - Missing BR pdflatex. * Tue Jan 13 2009 Richard W.M. Jones - 0.8.2-1 - New upstream version 0.8.2. * Sun Dec 21 2008 Richard W.M. Jones - 0.8.1-2 - Correct the source URL. * Sat Dec 20 2008 Richard W.M. Jones - 0.8.1-1 - New upstream release 0.8.1. - Run omake with the --verbose option to try to debug Koji failures. * Tue Dec 16 2008 Richard W.M. Jones - 0.8-1 - Initial RPM release, forward-ported to OCaml 3.11.0.