Hi,
Please look at the attached patch file.
This patch is based on mingw32-zlib.spec from EPEL RPM file:
http://download.fedora.redhat.com/pub/epel/5/SRPMS/mingw32-zlib-1.2.3-11.el5.src.rpm
I have build, installed and slightly tested mingw32-zlib-static on
CentOS5 machine with WINE installed;
$ cd contrib/minizip
$ i686-pc-mingw32-gcc -O2 -o minizip_st.exe minizip.c zip.c ioapi.c
iowin32.c /usr/i686-pc-mingw32/sys-root/mingw/lib/libz.a
$ i686-pc-mingw32-gcc -O2 -o miniunzip_st.exe miniunz.c unzip.c
ioapi.c iowin32.c /usr/i686-pc-mingw32/sys-root/mingw/lib/libz.a
$ cat ChangeLogUnzip crypt.h > readme.txt
$ ./minizip_st.exe test readme.txt
MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant
more info at http://www.winimage.com/zLibDll/unzip.html
creating test.zip
[...@wphome minizip_test]$ ./miniunzip_st.exe -l test.zip
MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant
more info at http://www.winimage.com/zLibDll/unzip.html
test.zip opened
Length Method Size Ratio Date Time CRC-32 Name
------ ------ ---- ----- ---- ---- ------ ----
6767 Defl:N 2718 40% 03-10-09 00:16 825b7335 readme.txt
$ mv readme.txt readme.old
$ ./miniunzip_st.exe test.zip
MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant
more info at http://www.winimage.com/zLibDll/unzip.html
test.zip opened
extracting: readme.txt
$ sha1sum -b readme.txt readme.old
508f38f3779c225513995c7373ff2013b9ce648d *readme.txt
508f38f3779c225513995c7373ff2013b9ce648d *readme.old
$ unzip -t test.zip
Archive: test.zip
testing: readme.txt OK
No errors detected in compressed data of test.zip.
Please consider applying the patch for mingw32-zlib spec file.
Thank you for ming32 fedora cross-compiler!
Best regards,
Wojtek
--- mingw32-zlib.spec.org 2008-12-21 12:18:49.000000000 +0100
+++ mingw32-zlib.spec 2009-03-09 23:52:45.000000000 +0100
@@ -6,7 +6,7 @@
Name: mingw32-zlib
Version: 1.2.3
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: MinGW Windows zlib compression library
License: zlib
@@ -32,6 +32,14 @@
%description
MinGW Windows zlib compression library.
+%package static
+Summary: Static libraries for mingw32-zlib development.
+Group: Development/Libraries
+Requires: zlib = %{version}
+
+%description static
+The mingw32-zlib-static package contains static library for mingw32-zlib development.
+
%prep
%setup -q -n zlib-1.2.3
@@ -72,8 +80,8 @@
mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libzdll.a \
$RPM_BUILD_ROOT%{_mingw32_libdir}/libz.dll.a
-# Remove static library.
-rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
+# Do NOT remove static library.
+# rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
%clean
@@ -87,8 +95,14 @@
%{_mingw32_libdir}/libz.dll.a
%{_mingw32_bindir}/zlib1.dll
+%files static
+%defattr(-,root,root)
+%{_mingw32_libdir}/libz.a
%changelog
+* Mon Mar 3 2009 W. Pilorz <wpilorz at gmail.com> 1.2.3-12
+- Add static subpackage.
+
* Thu Dec 18 2008 Richard W.M. Jones <[email protected]> - 1.2.3-11
- Pass correct CFLAGS to build.
_______________________________________________
fedora-mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw