jjames / rpms / ocaml-lwt

Forked from rpms/ocaml-lwt a year ago
Clone
138d93c
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
138d93c
%define debug_package %{nil}
138d93c
138d93c
Name:           ocaml-lwt
138d93c
Version:        1.1.0
138d93c
Release:        1%{?dist}
138d93c
Summary:        OCaml lightweight thread library
138d93c
138d93c
Group:          Development/Libraries
138d93c
License:        LGPLv2+ with exceptions
138d93c
URL:            http://ocsigen.org/install/lwt
138d93c
Source0:        http://ocsigen.org/download/lwt-%{version}.tar.gz
138d93c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
138d93c
138d93c
BuildRequires:  ocaml >= 3.10.0
138d93c
BuildRequires:  ocaml-findlib-devel
138d93c
BuildRequires:  ocaml-ocamldoc
138d93c
BuildRequires:  ocaml-ssl >= 0.4.0
138d93c
138d93c
%define _use_internal_dependency_generator 0
138d93c
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
138d93c
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
138d93c
138d93c
138d93c
%description
138d93c
Lwt is a lightweight thread library for Objective Caml.  This library
138d93c
is part of the Ocsigen project.
138d93c
138d93c
138d93c
%package        devel
138d93c
Summary:        Development files for %{name}
138d93c
Group:          Development/Libraries
138d93c
Requires:       %{name} = %{version}-%{release}
138d93c
138d93c
138d93c
%description    devel
138d93c
The %{name}-devel package contains libraries and signature files for
138d93c
developing applications that use %{name}.
138d93c
138d93c
138d93c
%prep
138d93c
%setup -q -n lwt-%{version}
138d93c
138d93c
mv README README.old
138d93c
iconv -f iso-8859-1 -t utf-8 < README.old > README
138d93c
138d93c
138d93c
%build
138d93c
make
138d93c
138d93c
138d93c
%install
138d93c
rm -rf $RPM_BUILD_ROOT
138d93c
export DESTDIR=$RPM_BUILD_ROOT
138d93c
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
138d93c
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
138d93c
make install
138d93c
138d93c
138d93c
%clean
138d93c
rm -rf $RPM_BUILD_ROOT
138d93c
138d93c
138d93c
%files
138d93c
%defattr(-,root,root,-)
138d93c
%doc LICENSE COPYING
138d93c
%{_libdir}/ocaml/lwt
138d93c
%if %opt
138d93c
%exclude %{_libdir}/ocaml/lwt/*.a
138d93c
%exclude %{_libdir}/ocaml/lwt/*.cmxa
138d93c
%exclude %{_libdir}/ocaml/lwt/*.cmx
138d93c
%endif
138d93c
%exclude %{_libdir}/ocaml/lwt/*.mli
138d93c
138d93c
138d93c
%files devel
138d93c
%defattr(-,root,root,-)
138d93c
%doc LICENSE COPYING CHANGES CHANGES.darcs README VERSION _build/lwt.docdir
138d93c
%if %opt
138d93c
%{_libdir}/ocaml/lwt/*.a
138d93c
%{_libdir}/ocaml/lwt/*.cmxa
138d93c
%{_libdir}/ocaml/lwt/*.cmx
138d93c
%endif
138d93c
%{_libdir}/ocaml/lwt/*.mli
138d93c
138d93c
138d93c
%changelog
138d93c
* Mon Sep  1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-1
138d93c
- Initial RPM release.