%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
Name: ocaml-res
Version: 3.0.0
Release: 3%{?dist}
Summary: OCaml library for resizing arrays and strings
Group: Development/Libraries
License: LGPLv2+ with exceptions
URL: http://www.ocaml.info/home/ocaml_sources.html#RES
Source0: http://www.ocaml.info/ocaml_sources/res-%{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: texlive-latex, texlive-dvips, ghostscript
%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 OCaml-library consists of a set of modules which implement
automatically resizing (= reallocating) datastructures that consume a
contiguous part of memory. This allows appending and removing of
elements to/from arrays (both boxed and unboxed), strings (->
buffers), bit strings and weak arrays while still maintaining fast
constant-time access to elements.
There are also functors that allow the generation of similar modules
which use different reallocation strategies.
%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 res-%{version}
%build
make
make doc
%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
%{_libdir}/ocaml/res
%if %opt
%exclude %{_libdir}/ocaml/res/*.a
%exclude %{_libdir}/ocaml/res/*.cmxa
%endif
%exclude %{_libdir}/ocaml/res/*.mli
%files devel
%defattr(-,root,root,-)
%doc LICENSE README Changes TODO
%doc lib/doc/res/html
%doc lib/doc/res/latex/*.dvi lib/doc/res/latex/*.ps lib/doc/res/latex/*.pdf
%if %opt
%{_libdir}/ocaml/res/*.a
%{_libdir}/ocaml/res/*.cmxa
%endif
%{_libdir}/ocaml/res/*.mli
%changelog
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 3.0.0-2
- Rebuild for OCaml 3.11.0+rc1.
* Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 3.0.0-1
- New upstream version 3.0.0.
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.6-2
- Rebuild for OCaml 3.11.0
* Sun Aug 31 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.6-1
- New upstream version 2.2.6.
* Sat May 3 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.5-1
- Initial RPM release.