]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame_incremental - crossmingw32-zlib.spec
- build using configure
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without asmopt # without assmbler optimization for i586+
4#
5# disable asmopt where not applicable
6%ifarch i386 i486
7%undefine with_asmopt
8%endif
9%ifnarch %{ix86}
10%undefine with_asmopt
11%endif
12%define realname zlib
13Summary: Library for compression and decompression - Ming32 cross version
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): Бібліотека для компресії та декомпресії
22Name: crossmingw32-%{realname}
23Version: 1.2.3
24Release: 1
25License: BSD
26Group: Libraries
27Source0: http://www.zlib.net/%{realname}-%{version}.tar.gz
28# Source0-md5: debc62758716a169df9f62e6ab2bc634
29Patch0: %{realname}-asmopt.patch
30Patch1: %{name}-shared.patch
31URL: http://www.zlib.org/
32BuildRequires: crossmingw32-gcc
33Requires: crossmingw32-runtime
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define no_install_post_strip 1
37
38%define target i386-mingw32
39%define target_platform i386-pc-mingw32
40%define arch %{_prefix}/%{target}
41%define gccarch %{_prefix}/lib/gcc-lib/%{target}
42%define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
43
44%define _sysprefix /usr
45%define _prefix %{_sysprefix}/%{target}
46%define _aclocaldir %{_datadir}/aclocal
47%define _pkgconfigdir %{_libdir}/pkgconfig
48%define __cc %{target}-gcc
49%define __cxx %{target}-g++
50
51%ifarch alpha sparc sparc64 sparcv9
52%define optflags -O2
53%endif
54
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
62%description -l de.UTF-8
63Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs-
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
76usa por varios programas de sistema.
77
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
84interface.
85
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
92strumieniu danych.
93
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той же самий потоковий інтерфейс.
122
123%package dll
124Summary: zlib - DLL library for Windows
125Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
126Group: Applications/Emulators
127
128%description dll
129zlib - DLL library for Windows.
130
131%description dll -l pl.UTF-8
132zlib - biblioteka DLL dla Windows.
133
134%prep
135%setup -q -n %{realname}-%{version}
136%patch1 -p1
137
138%if %{with asmopt}
139%patch0 -p1
140%ifarch i686 athlon
141cp contrib/asm686/match.S .
142%endif
143%ifarch i586
144cp contrib/asm586/match.S .
145%endif
146%endif
147
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
155
156%build
157CC="%{__cc}" \
158CXX="%{__cxx}" \
159AR="%{target}-ar rc" \
160RANLIB="%{target}-ranlib" \
161CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
162./configure \
163 --prefix=%{_prefix}
164
165%{__make}
166%{__make} z.dll
167
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
205%if 0%{!?debug:1}
206%{target}-strip -R.comment -R.note z.dll
207%{target}-strip -g -R.comment -R.note *.a
208%endif
209
210%install
211rm -rf $RPM_BUILD_ROOT
212install -d $RPM_BUILD_ROOT%{_prefix}/{/lib,/include,/bin}
213
214%{__make} install \
215 prefix=$RPM_BUILD_ROOT%{_prefix}
216
217
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}
222
223%clean
224rm -rf $RPM_BUILD_ROOT
225
226%files
227%defattr(644,root,root,755)
228#%{arch}/include/*.h
229%{_includedir}/*.h
230%{_libdir}/*
231
232%files dll
233%defattr(644,root,root,755)
234%{_bindir}/*.dll
This page took 0.073394 seconds and 4 git commands to generate.