Bump all spec releases for mass rebuild to mingw32-gcc 4.4
[fedora-mingw.git] / ocaml-csv / mingw32-ocaml-csv.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-csv
8 Version:        1.1.7
9 Release:        4%{?dist}
10 Summary:        MinGW Windows OCaml library for reading and writing CSV files
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14
15 URL:            http://merjis.com/developers/csv
16 Source0:        http://merjis.com/_file/ocaml-csv-%{version}.tar.gz
17
18 # Patches from native Fedora package:
19 Patch0:         csv-extlib.patch
20 Patch1:         csv-install.patch
21
22 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
23 BuildArch:      noarch
24
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
30
31
32 %description
33 This OCaml library can read and write CSV files, including all
34 extensions used by Excel - eg. quotes, newlines, 8 bit characters in
35 fields, quote-0 etc.
36
37 The library comes with a handy command line tool called csvtool for
38 handling CSV files from shell scripts.
39
40
41 %prep
42 %setup -q -n ocaml-csv-%{version}
43
44 %patch0 -p0
45 %patch1 -p1
46
47
48 %build
49 ulimit -s unlimited
50
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 \
55   -o csvtool.exe
56
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/csv
62 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
63
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
67
68 install csvtool.exe $RPM_BUILD_ROOT%{_mingw32_bindir}
69
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74
75 %files
76 %defattr(-,root,root)
77 %{_mingw32_bindir}/csvtool.exe
78 %{_libdir}/%{_mingw32_target}-ocaml/csv
79
80
81 %changelog
82 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-4
83 - Rebuild for mingw32-gcc 4.4
84
85 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-3
86 - Rebuild with latest OCaml cross-compiler.
87
88 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-2
89 - Force rebuild with latest OCaml compiler.
90
91 * Sat Nov 15 2008 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-1
92 - Initial RPM release.