3 %bcond_without asmopt # without assembler 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: c735eab2d659a96e5a594c9e8541ad63
22 Patch0: %{name}-LFS.patch
23 Patch1: %{realname}-lfs.patch
24 URL: http://www.zlib.net/
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}
97 cp contrib/asm686/match.S .
102 %{__make} -fwin32/Makefile.gcc all \
106 RANLIB="%{target}-ranlib" \
107 CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \
108 DLLWRAP="%{target}-dllwrap" \
109 RC="%{target}-windres" \
111 IMPLIB="libz.dll.a" \
112 prefix="%{_prefix}" \
113 %{?with_asmopt:OBJA=match.o}
115 # used by libtool to detect dependencies
116 cat << "EOF" >> libz.la
117 # libz.la - a libtool library file
118 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
119 # ^^^^ This line needs to stay
120 # Made by czarny czarny at pld-linux.org
122 # The name that we can dlopen(3).
123 dlname='../bin/zlib1.dll'
125 # Names of this library.
126 library_names='libz.dll.a'
128 # The name of the static archive.
131 # Libraries that this one depends upon.
134 # Version information for libz.
139 # Is this an already installed library?
142 # Should we warn about portability when linking against -modules?
145 # Files to dlopen/dlpreopen
149 # Directory that this library needs to be installed in:
153 sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
154 < zlib.pc.in > zlib.pc
157 %{target}-strip -R.comment -R.note zlib1.dll
158 %{target}-strip -g -R.comment -R.note *.a
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
165 install zlib.h $RPM_BUILD_ROOT%{_includedir}
166 install zconf.h $RPM_BUILD_ROOT%{_includedir}
167 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
168 install libz.a $RPM_BUILD_ROOT%{_libdir}
169 install libz.la $RPM_BUILD_ROOT%{_libdir}
170 install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
171 install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
173 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
176 rm -rf $RPM_BUILD_ROOT
179 %defattr(644,root,root,755)
180 %{_libdir}/libz.dll.a
182 %{_includedir}/zconf.h
183 %{_includedir}/zlib.h
184 %{_pkgconfigdir}/zlib.pc
187 %defattr(644,root,root,755)
191 %defattr(644,root,root,755)