Pull in ocamlfind binary.
[fedora-mingw.git] / ocaml-calendar / mingw32-ocaml-calendar.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-ocaml-calendar
8 Version:        2.0.4
9 Release:        1%{?dist}
10 Summary:        MinGW Windows OCaml library for managing dates and times
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14
15 URL:            http://www.lri.fr/~signoles/prog.en.html#calendar
16 Source0:        http://www.lri.fr/~signoles/prog/calendar/calendar-%{version}.tar.gz
17
18 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19 BuildArch:      noarch
20
21 BuildRequires:  mingw32-filesystem >= 35
22 BuildRequires:  mingw32-gcc
23 BuildRequires:  mingw32-binutils
24 BuildRequires:  mingw32-ocaml >= 3.11.0+beta1-8
25 BuildRequires:  mingw32-ocaml-findlib >= 1.2.2-7
26
27
28 %description
29 Objective Caml library for managing dates and times.
30
31
32 %prep
33 %setup -q -n calendar-%{version}
34
35
36 %build
37 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
38
39 %{_mingw32_configure} \
40   --libdir=%{_libdir} \
41   OCAMLC=i686-pc-mingw32-ocamlc \
42   OCAMLOPT=i686-pc-mingw32-ocamlopt \
43   OCAMLDEP=i686-pc-mingw32-ocamldep
44 make
45
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49
50 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
51 export DESTDIR=$RPM_BUILD_ROOT
52 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
53
54 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
55 make install
56
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61
62 %files
63 %defattr(-,root,root)
64 %{_libdir}/%{_mingw32_target}-ocaml/calendar/
65
66
67 %changelog
68 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-1
69 - Initial RPM release.