Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > e22df9b99ff424967099076300a58ce3 > files > 2

ocaml-event-0.6.0-6.mga3.src.rpm

Name:           ocaml-event
Version:        0.6.0
Release:        %mkrel 6
Summary:        An OCaml wrapper for the libevent API
License:        MIT
Group:          Development/OCaml
URL:            http://mmzeeman.home.xs4all.nl/ocaml/
Source0:        http://mmzeeman.home.xs4all.nl/ocaml/ocaml-event-%{version}.tar.gz
BuildRequires:  ocaml-findlib
BuildRequires:  libevent-devel
Requires:       libevent5

%description
An OCaml wrapper for the libevent API. The libevent API provides a
mechanism to execute a callback function when a specific event occurs on a
file descriptor or after a timeout has been reached. Furthermore, libevent
also support callbacks due to signals or regular timeouts. 
Currently, libevent supports /dev/poll, kqueue(2), select(2), poll(2) and
epoll(4). It also has experimental support for real-time signals. The
internal event mechanism is completely independent of the exposed event
API, and a simple update of libevent can provide new functionality without
having to redesign the applications. As a result, Libevent allows for
portable application development and provides the most scalable event
notification mechanism available on an operating system.

%package        devel
Summary:        Development files for %{name}
Group:          Development/OCaml
Requires:       %{name} = %{version}-%{release}
Requires:       libevent-devel

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%prep
%setup -q
sed -i README -e 's/Ocaml-Expat/OCaml-Event/'
sed -i examples/*.ml -e 's/Libevent/Liboevent/g'
sed -i examples/fifo_example.ml -e \
  's/Unix.unlink fifo;/if Sys.file_exists fifo then Unix.unlink fifo;/'
sed -i examples/Makefile -e 's/-package libevent/-package liboevent/g'
sed -i META -e 's/libevent.cma/liboevent.cma/'
sed -i META -e 's/libevent.cmxa/liboevent.cmxa/'

%build
make all allopt
make doc
rm -f doc/README

%install
rm -rf %{buildroot}
export DESTDIR=%{buildroot}
export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml
export DLLDIR=$OCAMLFIND_DESTDIR/stublibs
mkdir -p $OCAMLFIND_DESTDIR/stublibs
mkdir -p $OCAMLFIND_DESTDIR/liboevent
make install

%files
%doc README LICENCE
%dir %{_libdir}/ocaml/liboevent
%{_libdir}/ocaml/liboevent/META
%{_libdir}/ocaml/liboevent/*.cma
%{_libdir}/ocaml/liboevent/*.cmi
%{_libdir}/ocaml/stublibs/*.so*

%files devel
%doc doc examples
%{_libdir}/ocaml/liboevent/*.a
%{_libdir}/ocaml/liboevent/*.cmxa
%{_libdir}/ocaml/liboevent/*.mli


%changelog

* Sat Jan 12 2013 umeabot <umeabot> 0.6.0-6.mga3
+ Revision: 361292
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Oct 01 2012 blue_prawn <blue_prawn> 0.6.0-5.mga3
+ Revision: 301657
- new rpm group for ocaml
- new rpm group for ocaml

* Wed Mar 28 2012 malo <malo> 0.6.0-3.mga2
+ Revision: 227212
- adding missing Requires to libevent-devel

* Sat Mar 03 2012 malo <malo> 0.6.0-2.mga2
+ Revision: 217498
- fix requires to libevent5

* Fri Mar 02 2012 blue_prawn <blue_prawn> 0.6.0-1.mga2
+ Revision: 216981
- libevent dependency
- include the examples, and fix the example for the new module name
- imported package ocaml-event