Bump all spec releases for mass rebuild to mingw32-gcc 4.4
[fedora-mingw.git] / flexdll / mingw32-flexdll.spec
index c828c9d..6e76071 100644 (file)
@@ -6,9 +6,12 @@
 
 %define debug_package %{nil}
 
+# Running the tests requires Wine.
+%define run_tests 0
+
 Name:           mingw32-flexdll
 Version:        0.11
-Release:        1%{?dist}
+Release:        9%{?dist}
 Summary:        FlexDLL Windows DLL plugin API which is like dlopen
 
 License:        zlib
@@ -20,6 +23,9 @@ Source1:        flexlink.exe
 
 # Patches for MinGW:
 Patch1000:      mingw32-flexdll-0.11-mingw-cross.patch
+Patch1001:      mingw32-flexdll-0.11-no-cygpath.patch
+Patch1002:      mingw32-flexdll-0.11-no-directory.patch
+Patch1003:      mingw32-flexdll-0.11-real-objdump.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -27,6 +33,7 @@ BuildRequires:  mingw32-filesystem >= 35
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 BuildRequires:  ocaml
+BuildRequires:  dos2unix
 
 
 %description
@@ -67,6 +74,9 @@ make it easy to port applications developed for Unix.
 %setup -q -n flexdll
 
 %patch1000 -p1
+%patch1001 -p1
+%patch1002 -p1
+%patch1003 -p1
 
 for f in CHANGES LICENSE README; do
   chmod -x $f
@@ -82,7 +92,9 @@ strip flexlink.exe
 
 
 %check
+%if %{run_tests}
 make -C test CC=%{_mingw32_cc} O=o CHAIN=mingw
+%endif
 
 
 %install
@@ -100,10 +112,12 @@ install -m 0755 flexlink.exe \
   $RPM_BUILD_ROOT%{_libdir}/flexdll
 
 # Provide a wrapper script which sets FLEXDIR to point to the
-# libdir directory.
+# libdir directory.  Some programs call 'flexlink' and some call
+# 'flexlink.exe' so provide both.
 sed 's,@libdir@,%{_libdir},g' \
   < %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/flexlink.exe
 chmod 0755 $RPM_BUILD_ROOT%{_bindir}/flexlink.exe
+(cd $RPM_BUILD_ROOT%{_bindir} && ln flexlink.exe flexlink)
 
 
 %clean
@@ -113,10 +127,23 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root)
 %doc LICENSE README CHANGES
+%{_bindir}/flexlink
 %{_bindir}/flexlink.exe
 %{_libdir}/flexdll
 
 
 %changelog
-* Fri Nov 14 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-1
+* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.11-9
+- Rebuild for mingw32-gcc 4.4
+
+* Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-8
+- Apply real-objdump patch.
+
+* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-7
+- Apply no-directory patch.
+
+* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-6
+- Permanently disable cygpath (avoids 'NUL' file being created).
+
+* Fri Nov 14 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-4
 - Initial RPM release.