%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-lacaml Version: 4.3.0 Release: 2%{?dist} Summary: BLAS/LAPACK-interface for OCaml Group: Development/Libraries License: LGPLv2 with exceptions URL: http://ocaml.info/home/ocaml_sources.html Source0: http://www.ocaml.info/ocaml_sources/lacaml-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ocaml BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib-devel BuildRequires: lapack-devel BuildRequires: blas-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Parsetree %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh -i Common -i Install_printers -i Io -i Utils %description This OCaml-library interfaces the BLAS-library (Basic Linear Algebra Subroutines) and LAPACK-library (Linear Algebra routines), which are written in FORTRAN. This allows people to write high-performance numerical code for applications that need linear algebra. %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 lacaml-%{version} %build make make examples strip lib/dlllacaml_stubs.so %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 make install # By installing the *.cmx files, the compiler can do cross-module inlining. install -m 0644 lib/*.cmx $RPM_BUILD_ROOT%{_libdir}/ocaml/lacaml %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYRIGHT LICENSE %{_libdir}/ocaml/lacaml %if %opt %exclude %{_libdir}/ocaml/lacaml/*.a %exclude %{_libdir}/ocaml/lacaml/*.cmxa %exclude %{_libdir}/ocaml/lacaml/*.cmx %endif %exclude %{_libdir}/ocaml/lacaml/*.mli %exclude %{_libdir}/ocaml/lacaml/*.ml %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner %files devel %defattr(-,root,root,-) %doc COPYRIGHT LICENSE Changes README TODO VERSION %if %opt %{_libdir}/ocaml/lacaml/*.a %{_libdir}/ocaml/lacaml/*.cmxa %{_libdir}/ocaml/lacaml/*.cmx %endif %{_libdir}/ocaml/lacaml/*.mli %{_libdir}/ocaml/lacaml/*.ml %changelog * Tue Mar 4 2008 Richard W.M. Jones - 4.3.0-2 - Rebuild for ppc64. * Wed Feb 20 2008 Richard W.M. Jones - 4.3.0-1 - Initial RPM release.