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-csv
10 Summary: MinGW Windows OCaml library for reading and writing CSV files
13 Group: Development/Libraries
15 URL: http://merjis.com/developers/csv
16 Source0: http://merjis.com/_file/ocaml-csv-%{version}.tar.gz
18 # Patches from native Fedora package:
19 Patch0: csv-extlib.patch
20 Patch1: csv-install.patch
22 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25 BuildRequires: mingw32-filesystem >= 35
26 BuildRequires: mingw32-gcc
27 BuildRequires: mingw32-binutils
28 BuildRequires: mingw32-ocaml >= 3.11.0-0.15.beta1
29 BuildRequires: mingw32-ocaml-extlib
33 This OCaml library can read and write CSV files, including all
34 extensions used by Excel - eg. quotes, newlines, 8 bit characters in
37 The library comes with a handy command line tool called csvtool for
38 handling CSV files from shell scripts.
42 %setup -q -n ocaml-csv-%{version}
51 %{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa -c csv.mli
52 %{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa -c csv.ml
53 %{_mingw32_target}-ocamlopt -a -o csv.cmxa csv.cmx
54 %{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa csv.cmxa csvtool.ml \
59 rm -rf $RPM_BUILD_ROOT
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
62 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
64 install csv.cmxa *.a *.mli *.cmi *.cmx \
65 $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
66 install META $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
68 install csvtool.exe $RPM_BUILD_ROOT%{_mingw32_bindir}
72 rm -rf $RPM_BUILD_ROOT
77 %{_mingw32_bindir}/csvtool.exe
78 %{_libdir}/%{_mingw32_target}-ocaml/csv
82 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-3
83 - Rebuild with latest OCaml cross-compiler.
85 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-2
86 - Force rebuild with latest OCaml compiler.
88 * Sat Nov 15 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-1
89 - Initial RPM release.