]>
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 | |
05100bca | 39 | %define arch %{_prefix}/%{target} |
05100bca | 40 | |
41 | %define __cc %{target}-gcc | |
42 | %define __cxx %{target}-g++ | |
43 | ||
d3bc92cc | 44 | %ifarch alpha sparc sparc64 sparcv9 |
45 | %define optflags -O2 | |
46 | %endif | |
47 | ||
05100bca | 48 | %description |
49 | The 'zlib' compression library provides in-memory compression and | |
50 | decompression functions, including integrity checks of the | |
51 | uncompressed data. This version of the library supports only one | |
52 | compression method (deflation) but other algorithms may be added later | |
53 | and will have the same stream interface. | |
54 | ||
c31a725b | 55 | %description -l de.UTF-8 |
05100bca | 56 | Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs- |
c31a725b JR |
57 | und Dekomprimierungsfunktionen, einschließlich Integritätsprüfungen |
58 | der unkomprimierten Daten. Diese Version der Library unterstützt nur | |
59 | eine Komprimierungsmethode (Deflation), doch können weitere | |
60 | Algorithmen nachträglich eingefügt werden und haben dann dieselbe | |
61 | Oberfläche. | |
62 | ||
63 | %description -l es.UTF-8 | |
64 | La biblioteca de compresión 'zlib' nos ofrece funciones de compresión | |
65 | y descompresión en memoria, incluyendo chequeo de la integridad de | |
66 | datos no comprimidos. Esta versión de la biblioteca soporta solamente | |
67 | un método de compresión (deflación) pero otros algoritmos pueden ser | |
68 | añadidos más tarde y tendrán la misma interface. Esta biblioteca se | |
05100bca | 69 | usa por varios programas de sistema. |
70 | ||
c31a725b JR |
71 | %description -l fr.UTF-8 |
72 | La bibliothèque de compression « zlib » offre des fonctions de | |
73 | compression et de décompression en mémoire, ainsi qu'une vérification | |
74 | de l'intégrité des données décompressées. La version de cette | |
75 | bibliothèque ne gère qu'une méthode de compression (deflation), mais | |
76 | d'autres algorithmes peuvent être ajoutés plus tard et auront la même | |
05100bca | 77 | interface. |
78 | ||
c31a725b JR |
79 | %description -l pl.UTF-8 |
80 | Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w | |
81 | pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie | |
82 | dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę | |
83 | kompresji o nazwie deflation niemniej inne algorytmy mogą być | |
84 | dodawane udostępniając taki sam interfejs funkcji operujących na | |
05100bca | 85 | strumieniu danych. |
86 | ||
c31a725b JR |
87 | %description -l pt_BR.UTF-8 |
88 | A biblioteca de compressão 'zlib' oferece funções de compressão e | |
89 | descompressão em memória, incluindo checagem da integridade de dados | |
90 | não comprimidos. Essa versão da biblioteca suporta somente um método | |
91 | de compressão (deflação) mas outros algoritmos podem ser adicionados | |
92 | mais tarde e terão a mesma interface. Essa biblioteca é usada por | |
93 | vários programas de sistema. | |
94 | ||
95 | %description -l ru.UTF-8 | |
96 | Библиотека компрессии zlib содержит функции компрессии и декомпрессии | |
97 | в памяти, включаю проверку целостности декомпрессированных данных. Эта | |
98 | версия поддерживает только один метод компрессии (deflation), но | |
99 | впоследствии в нее могут быть добавлены и другие методы, и все они | |
100 | будут использовать тот же потоковый интерфейс. | |
101 | ||
102 | %description -l tr.UTF-8 | |
103 | zlib sıkıştırma kitaplığı bellekte sıkıştırma ve açma fonksiyonları | |
104 | içermektedir. Bu sürüm yalnızca 'deflation' yöntemini | |
105 | desteklemektedir. Ancak başka algoritmaların aynı arabirimle | |
106 | erişilebilecek şekilde eklenme olasılığı vardır. Bu kitaplık bir dizi | |
107 | sistem yazılımı tarafından kullanılmaktadır. | |
108 | ||
109 | %description -l uk.UTF-8 | |
110 | Бібліотека компресії zlib містить функції компресії та декомпресії в | |
111 | пам'яті з перевіркою цілості декомпресованих даних. Ця версія | |
112 | підтримує тільки один метод компресії (deflation), але в майбутньому в | |
113 | неї можуть бути додані і інші методи і всі вони будуть використовувати | |
114 | той же самий потоковий інтерфейс. | |
05100bca | 115 | |
0f3ccbe9 | 116 | %package dll |
117 | Summary: zlib - DLL library for Windows | |
38060f2f | 118 | Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows |
0f3ccbe9 | 119 | Group: Applications/Emulators |
120 | ||
121 | %description dll | |
122 | zlib - DLL library for Windows. | |
123 | ||
c31a725b | 124 | %description dll -l pl.UTF-8 |
0f3ccbe9 | 125 | zlib - biblioteka DLL dla Windows. |
126 | ||
05100bca | 127 | %prep |
128 | %setup -q -n %{realname}-%{version} | |
2eb49efb | 129 | %patch1 -p1 |
05100bca | 130 | |
d7deba55 JB |
131 | %if %{with asmopt} |
132 | %patch0 -p1 | |
05100bca | 133 | %ifarch i686 athlon |
134 | cp contrib/asm686/match.S . | |
135 | %endif | |
136 | %ifarch i586 | |
137 | cp contrib/asm586/match.S . | |
138 | %endif | |
139 | %endif | |
05100bca | 140 | |
d7deba55 JB |
141 | # fix for underline test |
142 | #sed -e 's/nm/%{target}-nm/' configure > configure.tmp | |
143 | # but it's broken anyway (tries to use mmap test remains, but there is no mmap | |
144 | # in mingw32) - so hardcode that underline is needed | |
145 | sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp | |
146 | mv -f configure.tmp configure | |
147 | chmod +x configure | |
05100bca | 148 | |
d7deba55 JB |
149 | %build |
150 | CC="%{__cc}" \ | |
151 | CXX="%{__cxx}" \ | |
152 | AR="%{target}-ar rc" \ | |
153 | RANLIB="%{target}-ranlib" \ | |
154 | CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \ | |
05100bca | 155 | ./configure \ |
05100bca | 156 | --prefix=%{arch} |
157 | ||
158 | %{__make} | |
0f3ccbe9 | 159 | %{__make} z.dll |
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 | |
168 | install -d $RPM_BUILD_ROOT%{arch}{/lib,/include} | |
0f3ccbe9 | 169 | install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system |
05100bca | 170 | |
d7deba55 JB |
171 | %{__make} install \ |
172 | prefix=$RPM_BUILD_ROOT%{arch} | |
173 | ||
05100bca | 174 | install zutil.h $RPM_BUILD_ROOT%{arch}/include |
0f3ccbe9 | 175 | install libz.dll.a $RPM_BUILD_ROOT%{arch}/lib |
176 | install z.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
e0945de1 | 177 | |
05100bca | 178 | %clean |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
181 | %files | |
d7deba55 JB |
182 | %defattr(644,root,root,755) |
183 | %{arch}/include/*.h | |
0f3ccbe9 | 184 | %{arch}/lib/* |
185 | ||
186 | %files dll | |
187 | %defattr(644,root,root,755) | |
188 | %{_datadir}/wine/windows/system/* |