%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-sexplib Version: 3.7.4 Release: 2%{?dist} Summary: OCaml library for converting OCaml values to S-expressions Group: Development/Libraries License: LGPLv2+ with exceptions and BSD URL: http://www.ocaml.info/home/ocaml_sources.html#sexplib310 Source0: http://www.ocaml.info/ocaml_sources/sexplib310-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-type-conv >= 1.5.0 BuildRequires: ocaml-camlp4-devel BuildRequires: dos2unix %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 This library contains functionality for parsing and pretty-printing S-expressions. In addition to that it contains an extremely useful preprocessing module for Camlp4, which can be used to automatically generate code from type definitions for efficiently converting OCaml-values to S-expressions and vice versa. In combination with the parsing and pretty-printing functionality this frees users from having to write their own I/O-routines for datastructures they define. Possible errors during automatic conversions from S-expressions to OCaml-values are reported in a very human-readable way. Another module in the library allows you to extract and replace sub-expressions in S-expressions. %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 sexplib310-%{version} dos2unix LICENSE.Tywith %build make %check ./lib_test/conv_test ./lib_test/sexp_test < lib_test/test.sexp %install 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 make install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE LICENSE.Tywith %{_libdir}/ocaml/sexplib %if %opt %exclude %{_libdir}/ocaml/sexplib/*.a %exclude %{_libdir}/ocaml/sexplib/*.cmxa %endif %exclude %{_libdir}/ocaml/sexplib/*.mli %files devel %defattr(-,root,root,-) %doc LICENSE LICENSE.Tywith CHANGES COPYRIGHT README.txt VERSION %if %opt %{_libdir}/ocaml/sexplib/*.a %{_libdir}/ocaml/sexplib/*.cmxa %endif %{_libdir}/ocaml/sexplib/*.mli %changelog * Mon May 10 2008 Richard W.M. Jones - 3.7.4-2 - Added BR ocaml-camlp4-devel. - Added a check section to run the included tests. * Sat May 3 2008 Richard W.M. Jones - 3.7.4-1 - New upstream version 3.7.4. * Wed Apr 23 2008 Richard W.M. Jones - 3.7.1-1 - New upstream version 3.7.1. - Fixed upstream URL. - Depend on latest type-conv. * Wed Mar 5 2008 Richard W.M. Jones - 3.5.0-2 - Remove ExcludeArch ppc64. * Sun Feb 24 2008 Richard W.M. Jones - 3.5.0-1 - Initial RPM release.