7f17fff1d8aa89d995364f9d52a34c61a68d4c37
[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:        1%{?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+beta1-9
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
33 %description
34 OCaml bindings for curses.
35
36
37 %prep
38 %setup -q -n ocaml-curses-%{version}
39
40 autoreconf
41
42
43 %build
44 ulimit -s unlimited
45
46 %{_mingw32_configure}
47
48 make all opt \
49   OCAMLC=%{_mingw32_target}-ocamlc \
50   OCAMLOPT=%{_mingw32_target}-ocamlopt \
51   OCAMLMKLIB=%{_mingw32_target}-ocamlmklib \
52   OCAMLMKLIB_FLAGS="-L%{_mingw32_libdir}" \
53   CLIBS="" \
54   all opt
55
56 # Build the test program just to check that everything is OK.
57 %{_mingw32_target}-ocamlopt -I . \
58   -o test.opt \
59   curses.cmxa \
60   test.ml \
61   -cclib "-L%{_mingw32_libdir} pdcurses.dll.a"
62
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
68 export DESTDIR=$RPM_BUILD_ROOT
69 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
70
71 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
72 ocamlfind install curses META *.cmi *.cmx *.cmxa *.a *.mli
73
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78
79 %files
80 %defattr(-,root,root)
81 %{_libdir}/%{_mingw32_target}-ocaml/curses/
82
83
84 %changelog
85 * Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
86 - New upstream version 1.0.3 with proper support for Windows
87   and PDCurses.
88
89 * Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-4
90 - libmlcurses.a contained a copy of pdcurses.dll.a in error.
91
92 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-3
93 - Use ocamlfind to install in the correct location.
94 - Install the META file.
95 - Fix the version number in changelog.
96
97 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-2
98 - Initial release.