3 %bcond_without asmopt # without assmbler optimization for i586+
5 # disable asmopt where not applicable
13 Summary: Library for compression and decompression - Ming32 cross version
14 Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla Ming32
15 Name: crossmingw32-%{realname}
19 Group: Development/Libraries
20 Source0: http://www.zlib.net/%{realname}-%{version}.tar.gz
21 # Source0-md5: debc62758716a169df9f62e6ab2bc634
22 Patch0: %{realname}-asmopt.patch
23 Patch1: %{name}-shared.patch
24 URL: http://www.zlib.org/
25 BuildRequires: crossmingw32-gcc
26 BuildRequires: sed >= 4.0
27 Requires: crossmingw32-runtime
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define no_install_post_strip 1
32 %define target i386-mingw32
33 %define target_platform i386-pc-mingw32
34 %define arch %{_prefix}/%{target}
35 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
36 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
38 %define _sysprefix /usr
39 %define _prefix %{_sysprefix}/%{target}
40 %define _dlldir /usr/share/wine/windows/system
41 %define __cc %{target}-gcc
42 %define __cxx %{target}-g++
44 %ifarch alpha sparc sparc64 sparcv9
49 The 'zlib' compression library provides in-memory compression and
50 decompression functions, including integrity checks of the
51 uncompressed data. This version of the library supports only one
52 compression method (deflation) but other algorithms may be added later
53 and will have the same stream interface.
55 This package contains the cross version for Win32.
57 %description -l pl.UTF-8
58 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
59 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
60 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
61 kompresji o nazwie deflation niemniej inne algorytmy mogą być
62 dodawane udostępniając taki sam interfejs funkcji operujących na
65 Ten pakiet zawiera wersję skrośną dla Win32.
68 Summary: Static zlib library (cross mingw32 version)
69 Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna mingw32)
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
74 Static zlib library (cross mingw32 version).
76 %description static -l pl.UTF-8
77 Statyczna biblioteka zlib (wersja skrośna mingw32).
80 Summary: zlib - DLL library for Windows
81 Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
82 Group: Applications/Emulators
86 zlib - DLL library for Windows.
88 %description dll -l pl.UTF-8
89 zlib - biblioteka DLL dla Windows.
92 %setup -q -n %{realname}-%{version}
98 cp contrib/asm686/match.S .
101 cp contrib/asm586/match.S .
105 # fix for underline test
106 #sed -i -e 's/nm/%{target}-nm/' configure
107 # but it's broken anyway (tries to use mmap test remains, but there is no mmap
108 # in mingw32) - so hardcode that underline is needed
109 sed -i -e 's/.*grep _hello.*/if false; then/' configure
115 AR="%{target}-ar rc" \
116 RANLIB="%{target}-ranlib" \
117 CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
124 # used by libtool to detect dependencies
125 cat << "EOF" >> libz.la
126 # libz.la - a libtool library file
127 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
128 # ^^^^ This line needs to stay
129 # Made by czarny czarny at pld-linux.org
131 # The name that we can dlopen(3).
132 dlname='../bin/libz.dll'
134 # Names of this library.
135 library_names='libz.dll.a'
137 # The name of the static archive.
140 # Libraries that this one depends upon.
143 # Version information for libz.
148 # Is this an already installed library?
151 # Should we warn about portability when linking against -modules?
154 # Files to dlopen/dlpreopen
158 # Directory that this library needs to be installed in:
163 %{target}-strip -R.comment -R.note z.dll
164 %{target}-strip -g -R.comment -R.note *.a
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
172 prefix=$RPM_BUILD_ROOT%{_prefix}
174 install zutil.h $RPM_BUILD_ROOT%{_includedir}
175 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
176 install libz.la $RPM_BUILD_ROOT%{_libdir}
177 install z.dll $RPM_BUILD_ROOT%{_dlldir}/libz.dll
179 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
182 rm -rf $RPM_BUILD_ROOT
185 %defattr(644,root,root,755)
186 %{_libdir}/libz.dll.a
191 %defattr(644,root,root,755)
195 %defattr(644,root,root,755)