]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame - crossmingw32-zlib.spec
- build using configure
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
CommitLineData
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 13Summary: Library for compression and decompression - Ming32 cross version
38060f2f
ER
14Summary(de.UTF-8): Library für die Komprimierung und Dekomprimierung
15Summary(es.UTF-8): Biblioteca para compresión y descompresión
16Summary(fr.UTF-8): bibliothèque de compression et décompression
17Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla Ming32
18Summary(pt_BR.UTF-8): Biblioteca para compressão e descompressão
19Summary(ru.UTF-8): Библиотека для компрессии и декомпрессии
20Summary(tr.UTF-8): Sıkıştırma işlemleri için kitaplık
21Summary(uk.UTF-8): Бібліотека для компресії та декомпресії
05100bca 22Name: crossmingw32-%{realname}
2eb49efb 23Version: 1.2.3
24Release: 1
05100bca 25License: BSD
26Group: Libraries
2eb49efb 27Source0: http://www.zlib.net/%{realname}-%{version}.tar.gz
28# Source0-md5: debc62758716a169df9f62e6ab2bc634
d7deba55 29Patch0: %{realname}-asmopt.patch
2eb49efb 30Patch1: %{name}-shared.patch
05100bca 31URL: http://www.zlib.org/
5d5f15b8 32BuildRequires: crossmingw32-gcc
60c0e878 33Requires: crossmingw32-runtime
87eb21a3 34BuildRoot: %{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
56The 'zlib' compression library provides in-memory compression and
57decompression functions, including integrity checks of the
58uncompressed data. This version of the library supports only one
59compression method (deflation) but other algorithms may be added later
60and will have the same stream interface.
61
c31a725b 62%description -l de.UTF-8
05100bca 63Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs-
c31a725b
JR
64und Dekomprimierungsfunktionen, einschließlich Integritätsprüfungen
65der unkomprimierten Daten. Diese Version der Library unterstützt nur
66eine Komprimierungsmethode (Deflation), doch können weitere
67Algorithmen nachträglich eingefügt werden und haben dann dieselbe
68Oberfläche.
69
70%description -l es.UTF-8
71La biblioteca de compresión 'zlib' nos ofrece funciones de compresión
72y descompresión en memoria, incluyendo chequeo de la integridad de
73datos no comprimidos. Esta versión de la biblioteca soporta solamente
74un método de compresión (deflación) pero otros algoritmos pueden ser
75añadidos más tarde y tendrán la misma interface. Esta biblioteca se
05100bca 76usa por varios programas de sistema.
77
c31a725b
JR
78%description -l fr.UTF-8
79La bibliothèque de compression « zlib » offre des fonctions de
80compression et de décompression en mémoire, ainsi qu'une vérification
81de l'intégrité des données décompressées. La version de cette
82bibliothèque ne gère qu'une méthode de compression (deflation), mais
83d'autres algorithmes peuvent être ajoutés plus tard et auront la même
05100bca 84interface.
85
c31a725b
JR
86%description -l pl.UTF-8
87Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
88pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
89dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
90kompresji o nazwie deflation niemniej inne algorytmy mogą być
91dodawane udostępniając taki sam interfejs funkcji operujących na
05100bca 92strumieniu danych.
93
c31a725b
JR
94%description -l pt_BR.UTF-8
95A biblioteca de compressão 'zlib' oferece funções de compressão e
96descompressão em memória, incluindo checagem da integridade de dados
97não comprimidos. Essa versão da biblioteca suporta somente um método
98de compressão (deflação) mas outros algoritmos podem ser adicionados
99mais tarde e terão a mesma interface. Essa biblioteca é usada por
100vá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
110zlib sıkıştırma kitaplığı bellekte sıkıştırma ve açma fonksiyonları
111içermektedir. Bu sürüm yalnızca 'deflation' yöntemini
112desteklemektedir. Ancak başka algoritmaların aynı arabirimle
113erişilebilecek şekilde eklenme olasılığı vardır. Bu kitaplık bir dizi
114sistem 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
124Summary: zlib - DLL library for Windows
38060f2f 125Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
0f3ccbe9 126Group: Applications/Emulators
127
128%description dll
129zlib - DLL library for Windows.
130
c31a725b 131%description dll -l pl.UTF-8
0f3ccbe9 132zlib - 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
141cp contrib/asm686/match.S .
142%endif
143%ifarch i586
144cp 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
152sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp
153mv -f configure.tmp configure
154chmod +x configure
05100bca 155
d7deba55
JB
156%build
157CC="%{__cc}" \
158CXX="%{__cxx}" \
159AR="%{target}-ar rc" \
160RANLIB="%{target}-ranlib" \
161CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
05100bca 162./configure \
e1a61953 163 --prefix=%{_prefix}
05100bca 164
165%{__make}
0f3ccbe9 166%{__make} z.dll
167
e1a61953 168cat << "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).
175dlname='../bin/libz.dll'
176
177# Names of this library.
178library_names='libz.dll.a'
179
180# The name of the static archive.
181old_library='libz.a'
182
183# Libraries that this one depends upon.
184dependency_libs=''
185
186# Version information for libz.
187current=0
188age=0
189revision=0
190
191# Is this an already installed library?
192installed=yes
193
194# Should we warn about portability when linking against -modules?
195shouldnotlink=no
196
197# Files to dlopen/dlpreopen
198dlopen=''
199dlpreopen=''
200
201# Directory that this library needs to be installed in:
202libdir='%{_libdir}'
203EOF
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
211rm -rf $RPM_BUILD_ROOT
e1a61953 212install -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 218install zutil.h $RPM_BUILD_ROOT%{_includedir}
219install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
220install z.dll $RPM_BUILD_ROOT%{_bindir}/libz.dll
221install libz.la $RPM_BUILD_ROOT%{_libdir}
e0945de1 222
05100bca 223%clean
224rm -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
This page took 0.09027 seconds and 4 git commands to generate.