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/current/%{realname}-%{version}.tar.gz
21 # Source0-md5: 47f6ed51b3c83a8534f9228531effa18
22 #Patch0: %{realname}-asmopt.patch
23 Patch0: %{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
35 %define _sysprefix /usr
36 %define _prefix %{_sysprefix}/%{target}
37 %define _libdir %{_prefix}/lib
38 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
39 %define _dlldir /usr/share/wine/windows/system
40 %define __cc %{target}-gcc
41 %define __cxx %{target}-g++
43 %ifarch alpha sparc sparc64 sparcv9
48 The 'zlib' compression library provides in-memory compression and
49 decompression functions, including integrity checks of the
50 uncompressed data. This version of the library supports only one
51 compression method (deflation) but other algorithms may be added later
52 and will have the same stream interface.
54 This package contains the cross version for Win32.
56 %description -l pl.UTF-8
57 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
58 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
59 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
60 kompresji o nazwie deflation niemniej inne algorytmy mogą być
61 dodawane udostępniając taki sam interfejs funkcji operujących na
64 Ten pakiet zawiera wersję skrośną dla Win32.
67 Summary: Static zlib library (cross mingw32 version)
68 Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna mingw32)
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 Static zlib library (cross mingw32 version).
75 %description static -l pl.UTF-8
76 Statyczna biblioteka zlib (wersja skrośna mingw32).
79 Summary: zlib - DLL library for Windows
80 Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
81 Group: Applications/Emulators
85 zlib - DLL library for Windows.
87 %description dll -l pl.UTF-8
88 zlib - biblioteka DLL dla Windows.
91 %setup -q -n %{realname}-%{version}
96 cp contrib/asm686/match.S .
99 cp contrib/asm586/match.S .
103 # fix for underline test
104 #sed -i -e 's/nm/%{target}-nm/' configure
105 # but it's broken anyway (tries to use mmap test remains, but there is no mmap
106 # in mingw32) - so hardcode that underline is needed
107 sed -i -e 's/.*grep _hello.*/if false; then/' configure
114 RANLIB="%{target}-ranlib" \
115 CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
120 %{__make} static z.dll \
121 %{?with_asmopt:OBJA=match.o}
123 # used by libtool to detect dependencies
124 cat << "EOF" >> libz.la
125 # libz.la - a libtool library file
126 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
127 # ^^^^ This line needs to stay
128 # Made by czarny czarny at pld-linux.org
130 # The name that we can dlopen(3).
131 dlname='../bin/libz.dll'
133 # Names of this library.
134 library_names='libz.dll.a'
136 # The name of the static archive.
139 # Libraries that this one depends upon.
142 # Version information for libz.
147 # Is this an already installed library?
150 # Should we warn about portability when linking against -modules?
153 # Files to dlopen/dlpreopen
157 # Directory that this library needs to be installed in:
162 %{target}-strip -R.comment -R.note z.dll
163 %{target}-strip -g -R.comment -R.note *.a
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
171 prefix=$RPM_BUILD_ROOT%{_prefix}
173 install zutil.h $RPM_BUILD_ROOT%{_includedir}
174 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
175 install libz.la $RPM_BUILD_ROOT%{_libdir}
176 install z.dll $RPM_BUILD_ROOT%{_dlldir}/libz.dll
178 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
181 rm -rf $RPM_BUILD_ROOT
184 %defattr(644,root,root,755)
185 %{_libdir}/libz.dll.a
187 %{_includedir}/zconf.h
188 %{_includedir}/zlib.h
189 %{_includedir}/zutil.h
190 %{_pkgconfigdir}/zlib.pc
193 %defattr(644,root,root,755)
197 %defattr(644,root,root,755)