Rename implibs as lib*.dll.a for compatibility with libtool
[fedora-mingw.git] / ocaml / mingw32-ocaml.spec
index d7ad2ed..1cf7874 100644 (file)
@@ -1,10 +1,14 @@
+# Built-in strip corrupts binaries, so use the mingw32 strip instead:
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+
 %define debug_package %{nil}
 
 %define otherlibraries win32unix str num dynlink bigarray systhreads win32graph
 
 Name:           mingw32-ocaml
 Version:        3.11.0+beta1
-Release:        12%{?dist}
+Release:        14%{?dist}
 Summary:        Objective Caml MinGW cross-compiler and programming environment
 
 License:        QPL and (LGPLv2+ with exceptions)
@@ -15,6 +19,7 @@ Source0:        http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}.tar
 
 # This is installed as config/Makefile when we cross-compile.
 Source1000:     Makefile-fedora-mingw.in
+Source1001:     README.Fedora
 
 # XXX We should apply any Fedora native patches here.
 
@@ -154,6 +159,8 @@ make -C tools ocamlmklib
 # Build ocamlopt
 make opt
 
+cp %{SOURCE1001} .
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -200,14 +207,6 @@ for f in ocamlc ocamlcp ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof ocamlr
 done
 popd
 
-# Not clear why this is necessary, but seems to be when
-# built on 32 bit, and it shouldn't do any harm.
-for f in $(
-  find $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml -name '*.a'
-); do
-  %{_mingw32_ranlib} $f
-done
-
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -215,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
+%doc README.Fedora
 %{_bindir}/%{_mingw32_target}-ocamlc
 %{_bindir}/%{_mingw32_target}-ocamlcp
 %{_bindir}/%{_mingw32_target}-ocamldep
@@ -227,7 +227,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-12
+* Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-14
+- Added README.Fedora.
+
+* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-13
 - Build the native compiler as 32 bits even on a 64 bit build
   architecture (because the target, Windows, is 32 bit).  The
   compiler does strength reduction and other optimizations
@@ -235,7 +238,7 @@ rm -rf $RPM_BUILD_ROOT
 - Requires libX11-devel.i386 and libgcc.i386.
 - Allow the normal dependency generators to run because this
   is a native package.
-- Run ranlib on *.a files.
+- Use mingw32 strip to avoid corrupting binaries.
 
 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-8
 - Install ocamlc.