3 %bcond_without asmopt # without assembler optimization for i686+
5 # disable asmopt where not applicable
13 Summary: Library for compression and decompression - MinGW32 cross version
14 Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32
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++
42 %define filterout_ld -Wl,-z,.*
43 %define filterout_c -gdwarf-3
45 %ifarch alpha sparc sparc64 sparcv9
50 The 'zlib' compression library provides in-memory compression and
51 decompression functions, including integrity checks of the
52 uncompressed data. This version of the library supports only one
53 compression method (deflation) but other algorithms may be added later
54 and will have the same stream interface.
56 This package contains the cross version for Win32.
58 %description -l pl.UTF-8
59 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
60 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
61 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
62 kompresji o nazwie deflation niemniej inne algorytmy mogą być
63 dodawane udostępniając taki sam interfejs funkcji operujących na
66 Ten pakiet zawiera wersję skrośną dla Win32.
69 Summary: Static zlib library (cross MinGW32 version)
70 Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna MinGW32)
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
75 Static zlib library (cross MinGW32 version).
77 %description static -l pl.UTF-8
78 Statyczna biblioteka zlib (wersja skrośna MinGW32).
81 Summary: zlib - DLL library for Windows
82 Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
83 Group: Applications/Emulators
87 zlib - DLL library for Windows.
89 %description dll -l pl.UTF-8
90 zlib - biblioteka DLL dla Windows.
93 %setup -q -n %{realname}-%{version}
99 cp contrib/asm686/match.S .
104 %{__make} -fwin32/Makefile.gcc all \
108 RANLIB="%{target}-ranlib" \
109 CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \
110 DLLWRAP="%{target}-dllwrap" \
111 RC="%{target}-windres" \
113 IMPLIB="libz.dll.a" \
114 prefix="%{_prefix}" \
115 %{?with_asmopt:OBJA=match.o}
117 # used by libtool to detect dependencies
118 cat << "EOF" >> libz.la
119 # libz.la - a libtool library file
120 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
121 # ^^^^ This line needs to stay
122 # Made by czarny czarny at pld-linux.org
124 # The name that we can dlopen(3).
125 dlname='%{_dlldir}/zlib1.dll'
127 # Names of this library.
128 library_names='libz.dll.a'
130 # The name of the static archive.
133 # Libraries that this one depends upon.
136 # Version information for libz.
141 # Is this an already installed library?
144 # Should we warn about portability when linking against -modules?
147 # Files to dlopen/dlpreopen
151 # Directory that this library needs to be installed in:
155 sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@\(shared\)\?libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
156 < zlib.pc.in > zlib.pc
159 %{target}-strip -R.comment -R.note zlib1.dll
160 %{target}-strip -g -R.comment -R.note *.a
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
167 install zlib.h $RPM_BUILD_ROOT%{_includedir}
168 install zconf.h $RPM_BUILD_ROOT%{_includedir}
169 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
170 install libz.a $RPM_BUILD_ROOT%{_libdir}
171 install libz.la $RPM_BUILD_ROOT%{_libdir}
172 install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
173 install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
175 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
178 rm -rf $RPM_BUILD_ROOT
181 %defattr(644,root,root,755)
182 %{_libdir}/libz.dll.a
184 %{_includedir}/zconf.h
185 %{_includedir}/zlib.h
186 %{_pkgconfigdir}/zlib.pc
189 %defattr(644,root,root,755)
193 %defattr(644,root,root,755)