]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blob - crossmingw32-zlib.spec
- build using configure
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
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
13 Summary:        Library for compression and decompression - Ming32 cross version
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):      Бібліотека для компресії та декомпресії
22 Name:           crossmingw32-%{realname}
23 Version:        1.2.3
24 Release:        1
25 License:        BSD
26 Group:          Libraries
27 Source0:        http://www.zlib.net/%{realname}-%{version}.tar.gz
28 # Source0-md5:  debc62758716a169df9f62e6ab2bc634
29 Patch0:         %{realname}-asmopt.patch
30 Patch1:         %{name}-shared.patch
31 URL:            http://www.zlib.org/
32 BuildRequires:  crossmingw32-gcc
33 Requires:       crossmingw32-runtime
34 BuildRoot:      %{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
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
62 %description -l de.UTF-8
63 Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs-
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
76 usa por varios programas de sistema.
77
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
84 interface.
85
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
92 strumieniu danych.
93
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 той же самий потоковий інтерфейс.
122
123 %package dll
124 Summary:        zlib - DLL library for Windows
125 Summary(pl.UTF-8):      zlib - biblioteka DLL dla Windows
126 Group:          Applications/Emulators
127
128 %description dll
129 zlib - DLL library for Windows.
130
131 %description dll -l pl.UTF-8
132 zlib - 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
141 cp contrib/asm686/match.S .
142 %endif
143 %ifarch i586
144 cp 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
152 sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp
153 mv -f configure.tmp configure
154 chmod +x configure
155
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}" \
162 ./configure \
163         --prefix=%{_prefix}
164
165 %{__make}
166 %{__make} z.dll
167
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
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
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT%{_prefix}/{/lib,/include,/bin}
213
214 %{__make} install \
215         prefix=$RPM_BUILD_ROOT%{_prefix}
216     
217
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}
222
223 %clean
224 rm -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.058001 seconds and 3 git commands to generate.