%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-janest-core Version: 0.5.0 Release: 2%{?dist} Summary: Many and various enhancements to the OCaml standard library Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://ocaml.janestcapital.com/?q=node/13 Source0: http://janestcapital.com/ocaml/core-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # ocaml-bin-prot is only available on little-endian architectures. # It looks like it would be fairly easy to move this dependency # into a subpackage. Alternatively we could fix bin-prot. ExclusiveArch: i386 x86-64 BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-bin-prot-devel >= 1.0.5 BuildRequires: ocaml-type-conv >= 1.5.0 BuildRequires: ocaml-sexplib-devel >= 3.7.4 BuildRequires: ocaml-res-devel >= 2.2.5 BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-camlp4-devel BuildRequires: chrpath %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 Core is Jane Street Capital's alternative standard library for OCaml. Highlights include: - Bag (set type with duplicates) - Bigbuffer (unlimited Buffer type) - Bigstring (unlimited String type) - 8/16/32/64-bit signed/unsigned binary packing functions - Bool type - Safe finalization for reading/writing files - Function composition operators - Enhanced versions of stdlib modules such as Arg, Array, Printf, etc. - Mutexes - CRC functions - Dequeue type - Doubly-linked list type - Enhanced exception module - Fast hash table - Force once (thunk that can be forced only once) - Functional queue type - Min-heap type - Enhanced input/output channels - Closed interval type - Interval set type - Read files as lines - Linux-specific syscalls such as sendfile, get/set TCP options, epoll, splice - Memoization - Piece-wise linear interpolation of floats - Polymorphic map and set - Find size of OCaml structures - Space-efficient tuples - Synchronized queues - Thread-safe queues - Convenience functions for Unix times - Timed events - Tuple convenience functions - Extended Unix module filling in some missing syscalls such as sync, getrusage, initgroups, etc. Most enhanced types are sexp-able and bin-prot-able. %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 core-%{version} %build make %check # As of 2008-05-03, I get: # # Error: 18:Linux_ext:1:send_fd # # Unix.Unix_error(11, "recv_fd", "") # ---------------------------------------------------------------------- # Ran: 149 tests in: 57.87 seconds. # FAILED: Cases: 149 Tried: 149 Errors: 1 Failures: 0 # # - RWMJ ./lib_test/test_runner.exe ||: %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 # Build some documentation files by hand for now. mkdir html pushd html ocamldoc -html -sort \ -I +threads \ -I +sexplib -I +bin-prot -I +res -I +type-conv \ -I ../lib \ -pp cpp \ ../lib/*.ml{,i} ||: popd strip $OCAMLFIND_DESTDIR/stublibs/dll*.so chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE COPYRIGHT %{_libdir}/ocaml/core %if %opt %exclude %{_libdir}/ocaml/core/*.a %exclude %{_libdir}/ocaml/core/*.cmxa %endif %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner %files devel %defattr(-,root,root,-) %doc LICENSE COPYRIGHT README CHANGES html %if %opt %{_libdir}/ocaml/core/*.a %{_libdir}/ocaml/core/*.cmxa %endif %changelog * Mon May 5 2008 Richard W.M. Jones - 0.5.0-3 - Rename the package to ocaml-janest-core as per agreement with Debian. * Sat May 3 2008 Richard W.M. Jones - 0.5.0-2 - Initial RPM release.