%define debug_package %{nil}
+# Running the tests requires Wine.
+%define run_tests 0
+
Name: mingw32-flexdll
Version: 0.11
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: FlexDLL Windows DLL plugin API which is like dlopen
License: zlib
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: ocaml
+BuildRequires: dos2unix
%description
%check
+%if %{run_tests}
make -C test CC=%{_mingw32_cc} O=o CHAIN=mingw
+%endif
%install
$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
%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 Nov 14 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-4
- Initial RPM release.