1 %include /usr/lib/rpm/mingw-defs
6 Summary: MinGW Windows zlib compression library
9 Group: Development/Libraries
10 URL: http://www.zlib.net/
11 Source0: http://www.zlib.net/zlib-%{version}.tar.gz
12 Patch1: zlib-win32.patch
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16 BuildRequires: mingw-filesystem >= 12
17 BuildRequires: mingw-gcc
18 BuildRequires: mingw-binutils
20 # For some reason mingw-find-provides doesn't get this.
21 Provides: mingw(zlib1.dll)
24 MinGW Windows zlib compression library.
28 %setup -q -n zlib-1.2.3
34 CFLAGS="%{_mingw_cflags}" \
35 RANLIB=%{_mingw_ranlib} \
38 make -f win32/Makefile.gcc \
41 RC=i686-pc-mingw32-windres \
42 DLLWRAP=i686-pc-mingw32-dllwrap \
43 STRIP=%{_mingw_strip} \
48 rm -rf $RPM_BUILD_ROOT
50 mkdir -p $RPM_BUILD_ROOT%{_mingw_bindir}
51 mkdir -p $RPM_BUILD_ROOT%{_mingw_includedir}
52 mkdir -p $RPM_BUILD_ROOT%{_mingw_libdir}
53 mkdir -p $RPM_BUILD_ROOT%{_mingw_mandir}/man3
55 make -f win32/Makefile.gcc \
56 INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw_includedir} \
57 LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw_libdir} \
58 BINARY_PATH=$RPM_BUILD_ROOT%{_mingw_bindir} \
61 # .dll.a file is misnamed for some reason - fix that.
62 mv $RPM_BUILD_ROOT%{_mingw_libdir}/libzdll.a \
63 $RPM_BUILD_ROOT%{_mingw_libdir}/libz.dll.a
65 # Remove static library.
66 rm $RPM_BUILD_ROOT%{_mingw_libdir}/libz.a
68 %__install zlib.3 $RPM_BUILD_ROOT%{_mingw_mandir}/man3
72 rm -rf $RPM_BUILD_ROOT
77 %{_mingw_includedir}/zconf.h
78 %{_mingw_includedir}/zlib.h
79 %{_mingw_libdir}/libz.dll.a
80 %{_mingw_bindir}/zlib1.dll
81 %{_mingw_mandir}/man3/zlib.3
85 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-6
86 - Remove static library.
88 * Fri Sep 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
89 - Fix misnamed file: zlibdll.a -> zlib.dll.a
90 - Explicitly provide mingw(zlib1.dll).
92 * Thu Sep 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
93 - Initial RPM release, largely based on earlier work from several sources.