5a9e25123317d4e28e32680d6a71da5fb4f41f5e
[fedora-mingw.git] / ocaml-curses / mingw32-ocaml-curses.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-curses
8 Version:        1.0.3
9 Release:        5%{?dist}
10 Summary:        MinGW Windows OCaml bindings for ncurses
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14
15 URL:            http://savannah.nongnu.org/projects/ocaml-tmk/
16 Source0:        http://download.savannah.gnu.org/releases/ocaml-tmk/ocaml-curses-%{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
26 BuildRequires:  mingw32-pdcurses
27
28 # Upstream package doesn't come with a configure script so
29 # we have to rebuild it.
30 BuildRequires:  autoconf, automake, libtool
31
32 Requires:       mingw32-pdcurses
33
34
35 %description
36 OCaml bindings for curses.
37
38
39 %prep
40 %setup -q -n ocaml-curses-%{version}
41
42 autoreconf
43
44
45 %build
46 ulimit -s unlimited
47
48 %{_mingw32_configure}
49
50 make all opt \
51   OCAMLC=%{_mingw32_target}-ocamlc \
52   OCAMLOPT=%{_mingw32_target}-ocamlopt \
53   OCAMLMKLIB=%{_mingw32_target}-ocamlmklib \
54   OCAMLMKLIB_FLAGS="-L%{_mingw32_libdir}" \
55   CLIBS="" \
56   all opt
57
58 # Build the test program just to check that everything is OK.
59 %{_mingw32_target}-ocamlopt -I . \
60   -o test.opt \
61   curses.cmxa \
62   test.ml \
63   -cclib "-lpdcurses"
64
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
70 export DESTDIR=$RPM_BUILD_ROOT
71 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
72
73 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
74 ocamlfind install curses META *.cmi *.cmx *.cmxa *.a *.mli
75
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80
81 %files
82 %defattr(-,root,root)
83 %{_libdir}/%{_mingw32_target}-ocaml/curses/
84
85
86 %changelog
87 * Sat Jan 24 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-5
88 - Force rebuild.
89
90 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-4
91 - Rebuild against newest OCaml cross-compiler.
92
93 * Sat Nov 22 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-3
94 - Rebuild against new pdcurses.
95
96 * Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-2
97 - Runtime requires PDCurses library.
98
99 * Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
100 - New upstream version 1.0.3 with proper support for Windows
101   and PDCurses.
102
103 * Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-4
104 - libmlcurses.a contained a copy of pdcurses.dll.a in error.
105
106 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-3
107 - Use ocamlfind to install in the correct location.
108 - Install the META file.
109 - Fix the version number in changelog.
110
111 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-2
112 - Initial release.