43b40c3ba48c254c4ded595e83b72d73a7edfde9
[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:        4%{?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-0.15.beta1
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   OCAMLCDOTOPT=i686-pc-mingw32-ocamlc \
43   OCAMLOPT=i686-pc-mingw32-ocamlopt \
44   OCAMLOPTDOTOPT=i686-pc-mingw32-ocamlopt \
45   OCAMLDEP=i686-pc-mingw32-ocamldep
46 make
47
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51
52 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
53 export DESTDIR=$RPM_BUILD_ROOT
54 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
55
56 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
57 make install
58
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63
64 %files
65 %defattr(-,root,root)
66 %{_libdir}/%{_mingw32_target}-ocaml/calendar/
67
68
69 %changelog
70 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-4
71 - Rebuild with newly named mingw32-ocaml cross-compiler.
72
73 * Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-3
74 - Override ocamlc.opt, ocamlopt.opt in case a compatible native
75   compiler is also installed.
76
77 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-2
78 - Force rebuild with latest OCaml compiler.
79
80 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-1
81 - Initial RPM release.