3 %bcond_without asmopt # without assmbler optimization for i686+
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 URL: http://www.zlib.org/
23 BuildRequires: crossmingw32-gcc
24 BuildRequires: sed >= 4.0
25 Requires: crossmingw32-runtime
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define no_install_post_strip 1
30 %define target i386-mingw32
31 %define target_platform i386-pc-mingw32
33 %define _sysprefix /usr
34 %define _prefix %{_sysprefix}/%{target}
35 %define _libdir %{_prefix}/lib
36 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
37 %define _dlldir /usr/share/wine/windows/system
38 %define __cc %{target}-gcc
39 %define __cxx %{target}-g++
41 %ifarch alpha sparc sparc64 sparcv9
46 The 'zlib' compression library provides in-memory compression and
47 decompression functions, including integrity checks of the
48 uncompressed data. This version of the library supports only one
49 compression method (deflation) but other algorithms may be added later
50 and will have the same stream interface.
52 This package contains the cross version for Win32.
54 %description -l pl.UTF-8
55 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
56 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
57 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
58 kompresji o nazwie deflation niemniej inne algorytmy mogą być
59 dodawane udostępniając taki sam interfejs funkcji operujących na
62 Ten pakiet zawiera wersję skrośną dla Win32.
65 Summary: Static zlib library (cross mingw32 version)
66 Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna mingw32)
67 Group: Development/Libraries
68 Requires: %{name} = %{version}-%{release}
71 Static zlib library (cross mingw32 version).
73 %description static -l pl.UTF-8
74 Statyczna biblioteka zlib (wersja skrośna mingw32).
77 Summary: zlib - DLL library for Windows
78 Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
79 Group: Applications/Emulators
83 zlib - DLL library for Windows.
85 %description dll -l pl.UTF-8
86 zlib - biblioteka DLL dla Windows.
89 %setup -q -n %{realname}-%{version}
93 cp contrib/asm686/match.S .
98 %{__make} -fwin32/Makefile.gcc all \
102 RANLIB="%{target}-ranlib" \
103 CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
104 DLLWRAP="%{target}-dllwrap" \
105 RC="%{target}-windres" \
107 IMPLIB="libz.dll.a" \
108 prefix="%{_prefix}" \
109 %{?with_asmopt:OBJA=match.o}
111 # used by libtool to detect dependencies
112 cat << "EOF" >> libz.la
113 # libz.la - a libtool library file
114 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
115 # ^^^^ This line needs to stay
116 # Made by czarny czarny at pld-linux.org
118 # The name that we can dlopen(3).
119 dlname='../bin/zlib1.dll'
121 # Names of this library.
122 library_names='libz.dll.a'
124 # The name of the static archive.
127 # Libraries that this one depends upon.
130 # Version information for libz.
135 # Is this an already installed library?
138 # Should we warn about portability when linking against -modules?
141 # Files to dlopen/dlpreopen
145 # Directory that this library needs to be installed in:
149 sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
150 < zlib.pc.in > zlib.pc
153 %{target}-strip -R.comment -R.note zlib1.dll
154 %{target}-strip -g -R.comment -R.note *.a
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
161 install zlib.h $RPM_BUILD_ROOT%{_includedir}
162 install zconf.h $RPM_BUILD_ROOT%{_includedir}
163 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
164 install libz.a $RPM_BUILD_ROOT%{_libdir}
165 install libz.la $RPM_BUILD_ROOT%{_libdir}
166 install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
167 install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
169 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
172 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
176 %{_libdir}/libz.dll.a
178 %{_includedir}/zconf.h
179 %{_includedir}/zlib.h
180 %{_pkgconfigdir}/zlib.pc
183 %defattr(644,root,root,755)
187 %defattr(644,root,root,755)