--- /dev/null
+--- csv.ml.orig 2007-05-29 13:07:33.000000000 +0100
++++ csv.ml 2007-05-29 13:07:44.000000000 +0100
+@@ -45,7 +45,7 @@
+ (* Uncomment the next line to enable Extlib's List function. These
+ * avoid stack overflows on really huge CSV files.
+ *)
+-(*open ExtList*)
++open ExtList
+
+ type t = string list list
+
+--- Makefile.orig 2007-05-29 13:11:36.000000000 +0100
++++ Makefile 2007-05-29 13:11:53.000000000 +0100
+@@ -6,15 +6,15 @@
+ # of file csv.ml.
+
+ OCAMLCINCS :=
+-#OCAMLCINCS := -package extlib
++OCAMLCINCS := -package extlib
+ OCAMLCFLAGS := -g
+ OCAMLCLIBS :=
+-#OCAMLCLIBS := -linkpkg
++OCAMLCLIBS := -linkpkg
+
+ OCAMLOPTINCS := $(OCAMLCINCS)
+ OCAMLOPTFLAGS :=
+ OCAMLOPTLIBS :=
+-#OCAMLOPTLIBS := -linkpkg
++OCAMLOPTLIBS := -linkpkg
+
+ OBJS := csv.cmo
+ XOBJS := $(OBJS:.cmo=.cmx)
--- /dev/null
+Binary files ocaml-csv-1.1.7.orig/csv.a and ocaml-csv-1.1.7/csv.a differ
+diff -ur ocaml-csv-1.1.7.orig/Makefile ocaml-csv-1.1.7/Makefile
+--- ocaml-csv-1.1.7.orig/Makefile 2008-10-27 22:04:21.000000000 +0000
++++ ocaml-csv-1.1.7/Makefile 2008-10-27 22:06:47.000000000 +0000
+@@ -70,7 +70,8 @@
+ # Build a distribution.
+
+ install:
+- ocamlfind install csv csv.{cmi,a,cmxa,cma,cmx} META
++ ocamlfind install csv csv.{cmi,a,cmxa,cma,cmx,mli} META
++ install -m 0755 csvtool $(DESTDIR)/usr/bin
+
+ dist:
+ $(MAKE) check-manifest
+Only in ocaml-csv-1.1.7.orig: README
--- /dev/null
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+
+Name: mingw32-ocaml-csv
+Version: 1.1.7
+Release: 1%{?dist}
+Summary: MinGW Windows OCaml library for reading and writing CSV files
+
+License: LGPLv2+
+Group: Development/Libraries
+
+URL: http://merjis.com/developers/csv
+Source0: http://merjis.com/_file/ocaml-csv-%{version}.tar.gz
+
+# Patches from native Fedora package:
+Patch0: csv-extlib.patch
+Patch1: csv-install.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+BuildRequires: mingw32-filesystem >= 35
+BuildRequires: mingw32-gcc
+BuildRequires: mingw32-binutils
+BuildRequires: mingw32-ocaml
+BuildRequires: mingw32-ocaml-extlib
+
+
+%description
+This OCaml library can read and write CSV files, including all
+extensions used by Excel - eg. quotes, newlines, 8 bit characters in
+fields, quote-0 etc.
+
+The library comes with a handy command line tool called csvtool for
+handling CSV files from shell scripts.
+
+
+%prep
+%setup -q -n ocaml-csv-%{version}
+
+%patch0 -p0
+%patch1 -p1
+
+
+%build
+%{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa -c csv.mli
+%{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa -c csv.ml
+%{_mingw32_target}-ocamlopt -a -o csv.cmxa csv.cmx
+%{_mingw32_target}-ocamlopt -I +extlib extLib.cmxa csv.cmxa csvtool.ml \
+ -o csvtool.exe
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
+
+install csv.cmxa *.a *.mli *.cmi *.cmx \
+ $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
+install META $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
+
+install csvtool.exe $RPM_BUILD_ROOT%{_mingw32_bindir}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw32_bindir}/csvtool.exe
+%{_libdir}/%{_mingw32_target}-ocaml/csv
+
+
+%changelog
+* Sat Nov 15 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-1
+- Initial RPM release.