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 %define debug_package %{nil}
9 # Findlib is a build tool, and we don't need to cross-compile it
10 # (except arguably the findlib library, but no one really uses that).
11 # However we do need the MinGW-specific META files in the right
12 # places, and that is what this package contains.
14 # To use ocamlfind with the MinGW META files, do:
16 # OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf \
19 Name: mingw32-ocaml-findlib
22 Summary: MinGW Windows Objective CAML package manager and build helper
25 Group: Development/Libraries
27 URL: http://projects.camlcity.org/projects/findlib.html
28 Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz
29 Source1000: ocamlfind.conf.in
31 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
34 BuildRequires: mingw32-filesystem >= 35
35 BuildRequires: mingw32-gcc
36 BuildRequires: mingw32-binutils
38 BuildRequires: ocaml-camlp4-devel
39 BuildRequires: ocaml-labltk-devel
40 BuildRequires: mingw32-ocaml >= 3.11.0-0.15.beta1
44 # Installing this should pull in ocamlfind (native binary).
45 Requires: ocaml-findlib
47 # Early versions were accidentally misnamed.
48 Obsoletes: mingw32-findlib <= 1.2.2-5
52 Objective CAML package manager and build helper.
56 %setup -q -n findlib-%{version}
60 %{_mingw32_target}-ocamlopt -version
61 %{_mingw32_target}-ocamlopt -where
62 (cd tools/extract_args && make)
63 tools/extract_args/extract_args -o src/findlib/ocaml_args.ml \
64 %{_mingw32_target}-ocamlc \
65 %{_mingw32_target}-ocamlcp \
66 %{_mingw32_target}-ocamlmktop \
67 %{_mingw32_target}-ocamlopt \
68 %{_mingw32_target}-ocamldep \
69 %{_mingw32_target}-ocamldoc ||:
70 cat src/findlib/ocaml_args.ml
71 ./configure -config %{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf \
73 -sitelib `%{_mingw32_target}-ocamlopt -where` \
78 rm doc/guide-html/TIMESTAMP
83 rm -rf $RPM_BUILD_ROOT
85 mkdir -p $RPM_BUILD_ROOT%{_bindir}
86 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
88 make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
89 mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
91 # Remove documentation which is already available
92 # in the Fedora native package.
93 rm -r $RPM_BUILD_ROOT%{_mandir}/man[15]/
95 # Remove ocamlfind binary - we will use the native version.
96 rm $RPM_BUILD_ROOT%{_bindir}/ocamlfind
97 rm $RPM_BUILD_ROOT%{_bindir}/safe_camlp4
99 # Remove findlib & num-top libs: if anything uses these we can
100 # add them back later.
101 rm -r $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/findlib
102 rm -r $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/num-top
104 # XXX topfind gets installed as %{_libdir}/ocaml - not sure why
105 # but delete it anyway.
106 rm $RPM_BUILD_ROOT%{_libdir}/ocaml
108 # Override /etc/%{_mingw32_target}-ocamlfind.conf with our
110 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
112 -e 's,@libdir@,%{_libdir},g' \
113 -e 's,@target@,%{_mingw32_target},g' \
115 > $RPM_BUILD_ROOT%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(-,root,root)
124 %config %{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
125 %{_libdir}/%{_mingw32_target}-ocaml/bigarray/META
126 %{_libdir}/%{_mingw32_target}-ocaml/camlp4/META
127 %{_libdir}/%{_mingw32_target}-ocaml/dbm/META
128 %{_libdir}/%{_mingw32_target}-ocaml/dynlink/META
129 %{_libdir}/%{_mingw32_target}-ocaml/graphics/META
130 %{_libdir}/%{_mingw32_target}-ocaml/labltk/META
131 %{_libdir}/%{_mingw32_target}-ocaml/num/META
132 %{_libdir}/%{_mingw32_target}-ocaml/stdlib/META
133 %{_libdir}/%{_mingw32_target}-ocaml/str/META
134 %{_libdir}/%{_mingw32_target}-ocaml/threads/META
135 %{_libdir}/%{_mingw32_target}-ocaml/unix/META
139 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-1
140 - New upstream release 1.2.3.
141 - Rebuild against the latest OCaml cross-compiler.
143 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-8
144 - Force rebuild against latest OCaml compiler.
146 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-7
147 - Use ocamlc now that we have it.
148 - Rename package correctly.
149 - Pull in ocamlfind binary.
151 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-3
152 - Initial RPM release.