]>
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 ER |
14 | Summary(de.UTF-8): Library für die Komprimierung und Dekomprimierung |
15 | Summary(es.UTF-8): Biblioteca para compresión y descompresión | |
16 | Summary(fr.UTF-8): bibliothèque de compression et décompression | |
17 | Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla Ming32 | |
18 | Summary(pt_BR.UTF-8): Biblioteca para compressão e descompressão | |
19 | Summary(ru.UTF-8): Библиотека для компрессии и декомпрессии | |
20 | Summary(tr.UTF-8): Sıkıştırma işlemleri için kitaplık | |
21 | Summary(uk.UTF-8): Бібліотека для компресії та декомпресії | |
05100bca | 22 | Name: crossmingw32-%{realname} |
2eb49efb | 23 | Version: 1.2.3 |
24 | Release: 1 | |
05100bca | 25 | License: BSD |
26 | Group: Libraries | |
2eb49efb | 27 | Source0: http://www.zlib.net/%{realname}-%{version}.tar.gz |
28 | # Source0-md5: debc62758716a169df9f62e6ab2bc634 | |
d7deba55 | 29 | Patch0: %{realname}-asmopt.patch |
2eb49efb | 30 | Patch1: %{name}-shared.patch |
05100bca | 31 | URL: http://www.zlib.org/ |
5d5f15b8 | 32 | BuildRequires: crossmingw32-gcc |
60c0e878 | 33 | Requires: crossmingw32-runtime |
87eb21a3 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
05100bca | 35 | |
36 | %define no_install_post_strip 1 | |
37 | ||
38 | %define target i386-mingw32 | |
e1a61953 | 39 | %define target_platform i386-pc-mingw32 |
05100bca | 40 | %define arch %{_prefix}/%{target} |
e1a61953 | 41 | %define gccarch %{_prefix}/lib/gcc-lib/%{target} |
42 | %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version} | |
05100bca | 43 | |
e1a61953 | 44 | %define _sysprefix /usr |
45 | %define _prefix %{_sysprefix}/%{target} | |
46 | %define _aclocaldir %{_datadir}/aclocal | |
47 | %define _pkgconfigdir %{_libdir}/pkgconfig | |
05100bca | 48 | %define __cc %{target}-gcc |
49 | %define __cxx %{target}-g++ | |
50 | ||
d3bc92cc | 51 | %ifarch alpha sparc sparc64 sparcv9 |
52 | %define optflags -O2 | |
53 | %endif | |
54 | ||
05100bca | 55 | %description |
56 | The 'zlib' compression library provides in-memory compression and | |
57 | decompression functions, including integrity checks of the | |
58 | uncompressed data. This version of the library supports only one | |
59 | compression method (deflation) but other algorithms may be added later | |
60 | and will have the same stream interface. | |
61 | ||
c31a725b | 62 | %description -l de.UTF-8 |
05100bca | 63 | Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs- |
c31a725b JR |
64 | und Dekomprimierungsfunktionen, einschließlich Integritätsprüfungen |
65 | der unkomprimierten Daten. Diese Version der Library unterstützt nur | |
66 | eine Komprimierungsmethode (Deflation), doch können weitere | |
67 | Algorithmen nachträglich eingefügt werden und haben dann dieselbe | |
68 | Oberfläche. | |
69 | ||
70 | %description -l es.UTF-8 | |
71 | La biblioteca de compresión 'zlib' nos ofrece funciones de compresión | |
72 | y descompresión en memoria, incluyendo chequeo de la integridad de | |
73 | datos no comprimidos. Esta versión de la biblioteca soporta solamente | |
74 | un método de compresión (deflación) pero otros algoritmos pueden ser | |
75 | añadidos más tarde y tendrán la misma interface. Esta biblioteca se | |
05100bca | 76 | usa por varios programas de sistema. |
77 | ||
c31a725b JR |
78 | %description -l fr.UTF-8 |
79 | La bibliothèque de compression « zlib » offre des fonctions de | |
80 | compression et de décompression en mémoire, ainsi qu'une vérification | |
81 | de l'intégrité des données décompressées. La version de cette | |
82 | bibliothèque ne gère qu'une méthode de compression (deflation), mais | |
83 | d'autres algorithmes peuvent être ajoutés plus tard et auront la même | |
05100bca | 84 | interface. |
85 | ||
c31a725b JR |
86 | %description -l pl.UTF-8 |
87 | Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w | |
88 | pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie | |
89 | dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę | |
90 | kompresji o nazwie deflation niemniej inne algorytmy mogą być | |
91 | dodawane udostępniając taki sam interfejs funkcji operujących na | |
05100bca | 92 | strumieniu danych. |
93 | ||
c31a725b JR |
94 | %description -l pt_BR.UTF-8 |
95 | A biblioteca de compressão 'zlib' oferece funções de compressão e | |
96 | descompressão em memória, incluindo checagem da integridade de dados | |
97 | não comprimidos. Essa versão da biblioteca suporta somente um método | |
98 | de compressão (deflação) mas outros algoritmos podem ser adicionados | |
99 | mais tarde e terão a mesma interface. Essa biblioteca é usada por | |
100 | vários programas de sistema. | |
101 | ||
102 | %description -l ru.UTF-8 | |
103 | Библиотека компрессии zlib содержит функции компрессии и декомпрессии | |
104 | в памяти, включаю проверку целостности декомпрессированных данных. Эта | |
105 | версия поддерживает только один метод компрессии (deflation), но | |
106 | впоследствии в нее могут быть добавлены и другие методы, и все они | |
107 | будут использовать тот же потоковый интерфейс. | |
108 | ||
109 | %description -l tr.UTF-8 | |
110 | zlib sıkıştırma kitaplığı bellekte sıkıştırma ve açma fonksiyonları | |
111 | içermektedir. Bu sürüm yalnızca 'deflation' yöntemini | |
112 | desteklemektedir. Ancak başka algoritmaların aynı arabirimle | |
113 | erişilebilecek şekilde eklenme olasılığı vardır. Bu kitaplık bir dizi | |
114 | sistem yazılımı tarafından kullanılmaktadır. | |
115 | ||
116 | %description -l uk.UTF-8 | |
117 | Бібліотека компресії zlib містить функції компресії та декомпресії в | |
118 | пам'яті з перевіркою цілості декомпресованих даних. Ця версія | |
119 | підтримує тільки один метод компресії (deflation), але в майбутньому в | |
120 | неї можуть бути додані і інші методи і всі вони будуть використовувати | |
121 | той же самий потоковий інтерфейс. | |
05100bca | 122 | |
0f3ccbe9 | 123 | %package dll |
124 | Summary: zlib - DLL library for Windows | |
38060f2f | 125 | Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows |
0f3ccbe9 | 126 | Group: Applications/Emulators |
127 | ||
128 | %description dll | |
129 | zlib - DLL library for Windows. | |
130 | ||
c31a725b | 131 | %description dll -l pl.UTF-8 |
0f3ccbe9 | 132 | zlib - biblioteka DLL dla Windows. |
133 | ||
05100bca | 134 | %prep |
135 | %setup -q -n %{realname}-%{version} | |
2eb49efb | 136 | %patch1 -p1 |
05100bca | 137 | |
d7deba55 JB |
138 | %if %{with asmopt} |
139 | %patch0 -p1 | |
05100bca | 140 | %ifarch i686 athlon |
141 | cp contrib/asm686/match.S . | |
142 | %endif | |
143 | %ifarch i586 | |
144 | cp contrib/asm586/match.S . | |
145 | %endif | |
146 | %endif | |
05100bca | 147 | |
d7deba55 JB |
148 | # fix for underline test |
149 | #sed -e 's/nm/%{target}-nm/' configure > configure.tmp | |
150 | # but it's broken anyway (tries to use mmap test remains, but there is no mmap | |
151 | # in mingw32) - so hardcode that underline is needed | |
152 | sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp | |
153 | mv -f configure.tmp configure | |
154 | chmod +x configure | |
05100bca | 155 | |
d7deba55 JB |
156 | %build |
157 | CC="%{__cc}" \ | |
158 | CXX="%{__cxx}" \ | |
159 | AR="%{target}-ar rc" \ | |
160 | RANLIB="%{target}-ranlib" \ | |
161 | CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \ | |
05100bca | 162 | ./configure \ |
e1a61953 | 163 | --prefix=%{_prefix} |
05100bca | 164 | |
165 | %{__make} | |
0f3ccbe9 | 166 | %{__make} z.dll |
167 | ||
e1a61953 | 168 | cat << "EOF" >> libz.la |
169 | # libz.la - a libtool library file | |
170 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | |
171 | # ^^^^ This line needs to stay | |
172 | # Made by czarny czarny at pld-linux.org | |
173 | ||
174 | # The name that we can dlopen(3). | |
175 | dlname='../bin/libz.dll' | |
176 | ||
177 | # Names of this library. | |
178 | library_names='libz.dll.a' | |
179 | ||
180 | # The name of the static archive. | |
181 | old_library='libz.a' | |
182 | ||
183 | # Libraries that this one depends upon. | |
184 | dependency_libs='' | |
185 | ||
186 | # Version information for libz. | |
187 | current=0 | |
188 | age=0 | |
189 | revision=0 | |
190 | ||
191 | # Is this an already installed library? | |
192 | installed=yes | |
193 | ||
194 | # Should we warn about portability when linking against -modules? | |
195 | shouldnotlink=no | |
196 | ||
197 | # Files to dlopen/dlpreopen | |
198 | dlopen='' | |
199 | dlpreopen='' | |
200 | ||
201 | # Directory that this library needs to be installed in: | |
202 | libdir='%{_libdir}' | |
203 | EOF | |
204 | ||
c872987c JB |
205 | %if 0%{!?debug:1} |
206 | %{target}-strip -R.comment -R.note z.dll | |
0f3ccbe9 | 207 | %{target}-strip -g -R.comment -R.note *.a |
c872987c | 208 | %endif |
05100bca | 209 | |
210 | %install | |
211 | rm -rf $RPM_BUILD_ROOT | |
e1a61953 | 212 | install -d $RPM_BUILD_ROOT%{_prefix}/{/lib,/include,/bin} |
05100bca | 213 | |
d7deba55 | 214 | %{__make} install \ |
e1a61953 | 215 | prefix=$RPM_BUILD_ROOT%{_prefix} |
216 | ||
d7deba55 | 217 | |
e1a61953 | 218 | install zutil.h $RPM_BUILD_ROOT%{_includedir} |
219 | install libz.dll.a $RPM_BUILD_ROOT%{_libdir} | |
220 | install z.dll $RPM_BUILD_ROOT%{_bindir}/libz.dll | |
221 | install libz.la $RPM_BUILD_ROOT%{_libdir} | |
e0945de1 | 222 | |
05100bca | 223 | %clean |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %files | |
d7deba55 | 227 | %defattr(644,root,root,755) |
e1a61953 | 228 | #%{arch}/include/*.h |
229 | %{_includedir}/*.h | |
230 | %{_libdir}/* | |
0f3ccbe9 | 231 | |
232 | %files dll | |
233 | %defattr(644,root,root,755) | |
e1a61953 | 234 | %{_bindir}/*.dll |