--- /dev/null
+%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+
+Name: mingw-zlib
+Version: 1.2.3
+Release: 1%{?dist}
+Summary: MinGW Windows zlib compression library
+
+License: zlib
+Group: Development/Libraries
+URL: http://www.zlib.net/
+Source0: http://www.zlib.net/zlib-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: mingw-gcc
+BuildRequires: mingw-binutils
+
+Requires: mingw-runtime
+
+%description
+MinGW Windows zlib compression library.
+
+
+%prep
+%setup -q -n zlib-1.2.3
+
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" \
+CC=i686-pc-mingw32-gcc RANLIB=i686-pc-mingw32-ranlib ./configure
+
+make all
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make prefix=$RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw install
+
+# These files conflict with ordinary binutils.
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/*
+
+
+%changelog
+* Mon Jul 7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-5
+- Initial RPM release, largely based on earlier work from several sources.