]>
Commit | Line | Data |
---|---|---|
d7deba55 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without asmopt # without assmbler optimization for i586+ | |
4 | # | |
02218425 | 5 | # disable asmopt where not applicable |
6 | %ifarch i386 i486 | |
7 | %undefine with_asmopt | |
8 | %endif | |
9 | %ifnarch %{ix86} | |
d7deba55 | 10 | %undefine with_asmopt |
05100bca | 11 | %endif |
05100bca | 12 | %define realname zlib |
5d5f15b8 | 13 | Summary: Library for compression and decompression - Ming32 cross version |
38060f2f | 14 | Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla Ming32 |
05100bca | 15 | Name: crossmingw32-%{realname} |
7d8bfb07 JB |
16 | Version: 1.2.4 |
17 | Release: 1 | |
05100bca | 18 | License: BSD |
bfb11d2d | 19 | Group: Development/Libraries |
7d8bfb07 JB |
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 | |
05100bca | 24 | URL: http://www.zlib.org/ |
5d5f15b8 | 25 | BuildRequires: crossmingw32-gcc |
bfb11d2d | 26 | BuildRequires: sed >= 4.0 |
60c0e878 | 27 | Requires: crossmingw32-runtime |
87eb21a3 | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
05100bca | 29 | |
30 | %define no_install_post_strip 1 | |
31 | ||
32 | %define target i386-mingw32 | |
e1a61953 | 33 | %define target_platform i386-pc-mingw32 |
05100bca | 34 | |
e1a61953 | 35 | %define _sysprefix /usr |
36 | %define _prefix %{_sysprefix}/%{target} | |
c4b70c8c | 37 | %define _libdir %{_prefix}/lib |
7d8bfb07 | 38 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
bfb11d2d | 39 | %define _dlldir /usr/share/wine/windows/system |
05100bca | 40 | %define __cc %{target}-gcc |
41 | %define __cxx %{target}-g++ | |
42 | ||
d3bc92cc | 43 | %ifarch alpha sparc sparc64 sparcv9 |
44 | %define optflags -O2 | |
45 | %endif | |
46 | ||
05100bca | 47 | %description |
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. | |
53 | ||
bfb11d2d | 54 | This package contains the cross version for Win32. |
05100bca | 55 | |
c31a725b JR |
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 | |
05100bca | 62 | strumieniu danych. |
63 | ||
bfb11d2d JB |
64 | Ten pakiet zawiera wersję skrośną dla Win32. |
65 | ||
66 | %package static | |
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} | |
71 | ||
72 | %description static | |
73 | Static zlib library (cross mingw32 version). | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Statyczna biblioteka zlib (wersja skrośna mingw32). | |
05100bca | 77 | |
0f3ccbe9 | 78 | %package dll |
79 | Summary: zlib - DLL library for Windows | |
38060f2f | 80 | Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows |
0f3ccbe9 | 81 | Group: Applications/Emulators |
bfb11d2d | 82 | Requires: wine |
0f3ccbe9 | 83 | |
84 | %description dll | |
85 | zlib - DLL library for Windows. | |
86 | ||
c31a725b | 87 | %description dll -l pl.UTF-8 |
0f3ccbe9 | 88 | zlib - biblioteka DLL dla Windows. |
89 | ||
05100bca | 90 | %prep |
91 | %setup -q -n %{realname}-%{version} | |
7d8bfb07 | 92 | %patch0 -p1 |
05100bca | 93 | |
d7deba55 | 94 | %if %{with asmopt} |
05100bca | 95 | %ifarch i686 athlon |
96 | cp contrib/asm686/match.S . | |
97 | %endif | |
98 | %ifarch i586 | |
99 | cp contrib/asm586/match.S . | |
100 | %endif | |
101 | %endif | |
05100bca | 102 | |
d7deba55 | 103 | # fix for underline test |
bfb11d2d | 104 | #sed -i -e 's/nm/%{target}-nm/' configure |
d7deba55 JB |
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 | |
bfb11d2d JB |
107 | sed -i -e 's/.*grep _hello.*/if false; then/' configure |
108 | # vim ' | |
05100bca | 109 | |
d7deba55 JB |
110 | %build |
111 | CC="%{__cc}" \ | |
112 | CXX="%{__cxx}" \ | |
7d8bfb07 | 113 | AR="%{target}-ar" \ |
d7deba55 JB |
114 | RANLIB="%{target}-ranlib" \ |
115 | CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \ | |
05100bca | 116 | ./configure \ |
7d8bfb07 | 117 | --static \ |
e1a61953 | 118 | --prefix=%{_prefix} |
05100bca | 119 | |
7d8bfb07 JB |
120 | %{__make} static z.dll \ |
121 | %{?with_asmopt:OBJA=match.o} | |
0f3ccbe9 | 122 | |
bfb11d2d | 123 | # used by libtool to detect dependencies |
e1a61953 | 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 | |
129 | ||
130 | # The name that we can dlopen(3). | |
131 | dlname='../bin/libz.dll' | |
132 | ||
133 | # Names of this library. | |
134 | library_names='libz.dll.a' | |
135 | ||
136 | # The name of the static archive. | |
137 | old_library='libz.a' | |
138 | ||
139 | # Libraries that this one depends upon. | |
140 | dependency_libs='' | |
141 | ||
142 | # Version information for libz. | |
143 | current=0 | |
144 | age=0 | |
145 | revision=0 | |
146 | ||
147 | # Is this an already installed library? | |
148 | installed=yes | |
149 | ||
150 | # Should we warn about portability when linking against -modules? | |
151 | shouldnotlink=no | |
152 | ||
153 | # Files to dlopen/dlpreopen | |
154 | dlopen='' | |
155 | dlpreopen='' | |
156 | ||
157 | # Directory that this library needs to be installed in: | |
158 | libdir='%{_libdir}' | |
159 | EOF | |
160 | ||
c872987c JB |
161 | %if 0%{!?debug:1} |
162 | %{target}-strip -R.comment -R.note z.dll | |
0f3ccbe9 | 163 | %{target}-strip -g -R.comment -R.note *.a |
c872987c | 164 | %endif |
05100bca | 165 | |
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
bfb11d2d | 168 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}} |
05100bca | 169 | |
d7deba55 | 170 | %{__make} install \ |
e1a61953 | 171 | prefix=$RPM_BUILD_ROOT%{_prefix} |
d7deba55 | 172 | |
e1a61953 | 173 | install zutil.h $RPM_BUILD_ROOT%{_includedir} |
174 | install libz.dll.a $RPM_BUILD_ROOT%{_libdir} | |
e1a61953 | 175 | install libz.la $RPM_BUILD_ROOT%{_libdir} |
bfb11d2d JB |
176 | install z.dll $RPM_BUILD_ROOT%{_dlldir}/libz.dll |
177 | ||
178 | rm -rf $RPM_BUILD_ROOT%{_datadir}/man | |
e0945de1 | 179 | |
05100bca | 180 | %clean |
181 | rm -rf $RPM_BUILD_ROOT | |
182 | ||
183 | %files | |
d7deba55 | 184 | %defattr(644,root,root,755) |
bfb11d2d JB |
185 | %{_libdir}/libz.dll.a |
186 | %{_libdir}/libz.la | |
7d8bfb07 JB |
187 | %{_includedir}/zconf.h |
188 | %{_includedir}/zlib.h | |
189 | %{_includedir}/zutil.h | |
190 | %{_pkgconfigdir}/zlib.pc | |
bfb11d2d JB |
191 | |
192 | %files static | |
193 | %defattr(644,root,root,755) | |
194 | %{_libdir}/libz.a | |
0f3ccbe9 | 195 | |
196 | %files dll | |
197 | %defattr(644,root,root,755) | |
bfb11d2d | 198 | %{_dlldir}/libz.dll |