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}
10 Summary: MinGW Windows zlib compression library
13 Group: Development/Libraries
14 URL: http://www.zlib.net/
15 Source0: http://www.zlib.net/zlib-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19 # From Fedora native package, none is applicable to us.
20 #Patch3: zlib-1.2.3-autotools.patch
21 #Patch4: minizip-1.2.3-autotools.patch
22 #Patch5: zlib-1.2.3-minizip.patch
24 # MinGW-specific patches.
25 Patch100: zlib-win32.patch
27 BuildRequires: mingw32-filesystem >= 23
28 BuildRequires: mingw32-gcc
29 BuildRequires: mingw32-binutils
33 MinGW Windows zlib compression library.
37 %setup -q -n zlib-1.2.3
44 CFLAGS="%{_mingw32_cflags}" \
45 RANLIB=%{_mingw32_ranlib} \
48 make -f win32/Makefile.gcc \
51 RC=i686-pc-mingw32-windres \
52 DLLWRAP=i686-pc-mingw32-dllwrap \
53 STRIP=%{_mingw32_strip} \
58 rm -rf $RPM_BUILD_ROOT
60 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
61 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
62 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
64 make -f win32/Makefile.gcc \
65 INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw32_includedir} \
66 LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw32_libdir} \
67 BINARY_PATH=$RPM_BUILD_ROOT%{_mingw32_bindir} \
70 # .dll.a file is misnamed for some reason - fix that.
71 mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libzdll.a \
72 $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.dll.a
74 # Remove static library.
75 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
79 rm -rf $RPM_BUILD_ROOT
84 %{_mingw32_includedir}/zconf.h
85 %{_mingw32_includedir}/zlib.h
86 %{_mingw32_libdir}/libz.dll.a
87 %{_mingw32_bindir}/zlib1.dll
91 * Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
92 - Consider native patches.
94 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
95 - Rename mingw -> mingw32.
97 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
100 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
101 - Remove static library.
103 * Fri Sep 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
104 - Fix misnamed file: zlibdll.a -> zlib.dll.a
105 - Explicitly provide mingw(zlib1.dll).
107 * Thu Sep 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
108 - Initial RPM release, largely based on earlier work from several sources.