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}
7 Name: mingw32-ocaml-extlib
10 Summary: MinGW Windows port of OCaml ExtLib
12 License: LGPLv2+ with exceptions
13 Group: Development/Libraries
15 URL: http://code.google.com/p/ocaml-extlib/
16 Source0: http://ocaml-extlib.googlecode.com/files/extlib-%{version}.tar.gz
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21 BuildRequires: mingw32-filesystem >= 35
22 BuildRequires: mingw32-gcc
23 BuildRequires: mingw32-binutils
24 BuildRequires: mingw32-ocaml
28 ExtLib is a project aiming at providing a complete - yet small -
29 standard library for the OCaml programming language. The purpose of
30 this library is to add new functions to OCaml Standard Library
31 modules, to modify some functions in order to get better performances
32 or more safety (tail-recursive) but also to provide new modules which
33 should be useful for the average OCaml programmer.
37 %setup -q -n extlib-%{version}
39 # Files in the archive have spurious +x mode.
42 # and DOS line endings.
43 for f in *.ml *.mli README.txt LICENSE; do \
44 %{__sed} -i 's/\r//' $f;
49 # Extlib build system is on crack and unusable for cross-compiling.
50 # We ignore it completely and do the build steps by hand. This
51 # list of modules should match the list in 'install.ml'.
52 %define modules enum bitSet dynArray extArray extHashtbl extList extString global IO option pMap std uChar uTF8 base64 unzip refList optParse dllist
54 i686-pc-mingw32-ocamlopt -c \
55 $(for f in %{modules}; do echo $f.mli; done)
56 i686-pc-mingw32-ocamlopt -c \
57 $(for f in %{modules}; do echo $f.ml; done)
58 i686-pc-mingw32-ocamlopt -a -o extLib.cmxa \
59 $(for f in %{modules}; do echo $f.cmx; done)
63 rm -rf $RPM_BUILD_ROOT
65 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
66 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib
68 install $(for f in %{modules}; do echo $f.mli $f.cmx $f.cmi; done) \
69 $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib
70 install extLib.cmxa extLib.a \
71 $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib
73 $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/extlib/META
77 rm -rf $RPM_BUILD_ROOT
82 %{_libdir}/%{_mingw32_target}-ocaml/extlib
86 * Sat Nov 15 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5.1-1
87 - Initial RPM release.