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 \
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: mingw32-ocaml
44 Objective CAML package manager and build helper.
48 %setup -q -n findlib-%{version}
52 %{_mingw32_target}-ocamlopt -version
53 %{_mingw32_target}-ocamlopt -where
54 (cd tools/extract_args && make)
55 tools/extract_args/extract_args -o src/findlib/ocaml_args.ml \
56 %{_mingw32_target}-ocamlc \
57 %{_mingw32_target}-ocamlcp \
58 %{_mingw32_target}-ocamlmktop \
59 %{_mingw32_target}-ocamlopt \
60 %{_mingw32_target}-ocamldep \
61 %{_mingw32_target}-ocamldoc ||:
62 cat src/findlib/ocaml_args.ml
63 ./configure -config %{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf \
65 -sitelib `%{_mingw32_target}-ocamlopt -where` \
70 rm doc/guide-html/TIMESTAMP
75 rm -rf $RPM_BUILD_ROOT
77 mkdir -p $RPM_BUILD_ROOT%{_bindir}
78 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
80 make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
81 mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
83 # Remove documentation which is already available
84 # in the Fedora native package.
85 rm -r $RPM_BUILD_ROOT%{_mandir}/man[15]/
87 # Remove ocamlfind binary - we will use the native version.
88 rm $RPM_BUILD_ROOT%{_bindir}/ocamlfind
89 rm $RPM_BUILD_ROOT%{_bindir}/safe_camlp4
91 # Remove findlib & num-top libs: if anything uses these we can
92 # add them back later.
93 rm -r $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/findlib
94 rm -r $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/num-top
96 # XXX topfind gets installed as %{_libdir}/ocaml - not sure why
97 # but delete it anyway.
98 rm $RPM_BUILD_ROOT%{_libdir}/ocaml
100 # Override /etc/%{_mingw32_target}-ocamlfind.conf with our
102 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
104 -e 's,@libdir@,%{_libdir},g' \
105 -e 's,@target@,%{_mingw32_target},g' \
107 > $RPM_BUILD_ROOT%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
111 rm -rf $RPM_BUILD_ROOT
115 %defattr(-,root,root)
116 %config %{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
117 %{_libdir}/%{_mingw32_target}-ocaml/bigarray/META
118 %{_libdir}/%{_mingw32_target}-ocaml/camlp4/META
119 %{_libdir}/%{_mingw32_target}-ocaml/dbm/META
120 %{_libdir}/%{_mingw32_target}-ocaml/dynlink/META
121 %{_libdir}/%{_mingw32_target}-ocaml/graphics/META
122 %{_libdir}/%{_mingw32_target}-ocaml/labltk/META
123 %{_libdir}/%{_mingw32_target}-ocaml/num/META
124 %{_libdir}/%{_mingw32_target}-ocaml/stdlib/META
125 %{_libdir}/%{_mingw32_target}-ocaml/str/META
126 %{_libdir}/%{_mingw32_target}-ocaml/threads/META
127 %{_libdir}/%{_mingw32_target}-ocaml/unix/META
131 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-3
132 - Initial RPM release.