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: Cross-compiled 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
30 BuildRequires: mingw64-filesystem >= 10
31 BuildRequires: mingw64-gcc
32 BuildRequires: mingw64-binutils
36 Cross-compiled zlib compression library.
39 %package -n mingw64-zlib
40 Summary: Cross-compiled zlib compression library
41 Group: Development/Libraries
44 %description -n mingw64-zlib
45 Cross-compiled zlib compression library.
49 %setup -q -c -n %{name}-%{version} -a 0
50 mv zlib-%{version} mingw32
51 %setup -q -c -D -n %{name}-%{version} -a 0
52 mv zlib-%{version} mingw64
67 CFLAGS="%{_mingw32_cflags}" \
68 RANLIB=%{_mingw32_ranlib} \
71 make -f win32/Makefile.gcc \
72 CFLAGS="%{_mingw32_cflags}" \
75 RC=%{_mingw32_windres} \
76 DLLWRAP=%{_mingw32_dllwrap} \
77 STRIP=%{_mingw32_strip} \
85 CFLAGS="%{_mingw64_cflags}" \
86 RANLIB=%{_mingw64_ranlib} \
89 make -f win32/Makefile.gcc \
90 CFLAGS="%{_mingw64_cflags}" \
93 RC=%{_mingw64_windres} \
94 DLLWRAP=%{_mingw64_dllwrap} \
95 STRIP=%{_mingw64_strip} \
102 rm -rf $RPM_BUILD_ROOT
106 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
107 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
108 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
110 make -f win32/Makefile.gcc \
111 INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw32_includedir} \
112 LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw32_libdir} \
113 BINARY_PATH=$RPM_BUILD_ROOT%{_mingw32_bindir} \
116 # .dll.a file is misnamed for some reason - fix that.
117 mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libzdll.a \
118 $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.dll.a
120 # Remove static library.
121 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
127 mkdir -p $RPM_BUILD_ROOT%{_mingw64_bindir}
128 mkdir -p $RPM_BUILD_ROOT%{_mingw64_includedir}
129 mkdir -p $RPM_BUILD_ROOT%{_mingw64_libdir}
131 make -f win32/Makefile.gcc \
132 INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw64_includedir} \
133 LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw64_libdir} \
134 BINARY_PATH=$RPM_BUILD_ROOT%{_mingw64_bindir} \
137 # .dll.a file is misnamed for some reason - fix that.
138 mv $RPM_BUILD_ROOT%{_mingw64_libdir}/libzdll.a \
139 $RPM_BUILD_ROOT%{_mingw64_libdir}/libz.dll.a
141 # Remove static library.
142 rm $RPM_BUILD_ROOT%{_mingw64_libdir}/libz.a
148 rm -rf $RPM_BUILD_ROOT
152 %defattr(-,root,root)
153 %{_mingw32_includedir}/zconf.h
154 %{_mingw32_includedir}/zlib.h
155 %{_mingw32_libdir}/libz.dll.a
156 %{_mingw32_bindir}/zlib1.dll
159 %files -n mingw64-zlib
160 %defattr(-,root,root)
161 %{_mingw64_includedir}/zconf.h
162 %{_mingw64_includedir}/zlib.h
163 %{_mingw64_libdir}/libz.dll.a
164 %{_mingw64_bindir}/zlib1.dll
168 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-14
169 - Rebuild for mingw32-gcc 4.4
171 * Mon Jan 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-12
172 - Force rebuild to test maintenance account.
174 * Thu Dec 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-11
175 - Pass correct CFLAGS to build.
177 * Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
178 - Consider native patches.
180 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
181 - Rename mingw -> mingw32.
183 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
186 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
187 - Remove static library.
189 * Fri Sep 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
190 - Fix misnamed file: zlibdll.a -> zlib.dll.a
191 - Explicitly provide mingw(zlib1.dll).
193 * Thu Sep 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
194 - Initial RPM release, largely based on earlier work from several sources.