summaryrefslogtreecommitdiff
path: root/crossmingw32-zlib.spec
blob: c73887004c6205d3d06e99bc8d91d220a88edb94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#
# Conditional build:
%bcond_without	asmopt	# without assmbler optimization for i586+
#
# disable asmopt where not applicable
%ifarch i386 i486
%undefine	with_asmopt
%endif
%ifnarch %{ix86}
%undefine	with_asmopt
%endif
%define		realname		zlib
Summary:	Library for compression and decompression - Ming32 cross version
Summary(de):	Library für die Komprimierung und Dekomprimierung
Summary(es):	Biblioteca para compresión y descompresión
Summary(fr):	bibliothèque de compression et décompression
Summary(pl):	Biblioteka z podprogramami do kompresji i dekompresji - wersja skro¶na dla Ming32
Summary(pt_BR):	Biblioteca para compressão e descompressão
Summary(ru):	âÉÂÌÉÏÔÅËÁ ÄÌÑ ËÏÍÐÒÅÓÓÉÉ É ÄÅËÏÍÐÒÅÓÓÉÉ
Summary(tr):	Sýkýþtýrma iþlemleri için kitaplýk
Summary(uk):	â¦Â̦ÏÔÅËÁ ÄÌÑ ËÏÍÐÒÅÓ¦§ ÔÁ ÄÅËÏÍÐÒÅÓ¦§
Name:		crossmingw32-%{realname}
Version:	1.2.1.1
Release:	2
License:	BSD
Group:		Libraries
#Source0:	http://www.gzip.org/zlib/%{realname}-%{version}.tar.gz
Source0:	http://devel.santafelinux.com/source/%{realname}-%{version}/upstream/tarballs/%{realname}-%{version}.tar.gz
# Source0-md5:	e30f85eed4ecb32841cafe12673c6590
Patch0:		%{realname}-asmopt.patch
Patch1:		%{realname}-infsec.patch
Patch2:		%{name}-shared.patch
URL:		http://www.zlib.org/
BuildRequires:	crossmingw32-gcc
Requires:	crossmingw32-runtime
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		no_install_post_strip	1

%define		target			i386-mingw32
%define		arch			%{_prefix}/%{target}

%define		__cc			%{target}-gcc
%define		__cxx			%{target}-g++

%ifarch alpha sparc sparc64 sparcv9
%define		optflags	-O2
%endif

%description
The 'zlib' compression library provides in-memory compression and
decompression functions, including integrity checks of the
uncompressed data. This version of the library supports only one
compression method (deflation) but other algorithms may be added later
and will have the same stream interface.

%description -l de
Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs-
und Dekomprimierungsfunktionen, einschließlich Integritätsprüfungen
der unkomprimierten Daten. Diese Version der Library unterstützt nur
eine Komprimierungsmethode (Deflation), doch können weitere
Algorithmen nachträglich eingefügt werden und haben dann dieselbe
Oberfläche.

%description -l es
La biblioteca de compresión 'zlib' nos ofrece funciones de compresión
y descompresión en memoria, incluyendo chequeo de la integridad de
datos no comprimidos. Esta versión de la biblioteca soporta solamente
un método de compresión (deflación) pero otros algoritmos pueden ser
añadidos más tarde y tendrán la misma interface. Esta biblioteca se
usa por varios programas de sistema.

%description -l fr
La bibliothèque de compression « zlib » offre des fonctions de
compression et de décompression en mémoire, ainsi qu'une vérification
de l'intégrité des données décompressées. La version de cette
bibliothèque ne gère qu'une méthode de compression (deflation), mais
d'autres algorithmes peuvent être ajoutés plus tard et auront la même
interface.

%description -l pl
Biblioteka zlib udostêpnia podprogramy do kompresji i dekompresji w
pamiêci operacyjnej w³±cznie ze sprawdzaniem integralno¶ci w trakcie
dekompresji. Ta wersja biblioteki udostêpnia tylko jedn± metodê
kompresji o nazwie deflation niemniej inne algorytmy mog± byæ
dodawane udostêpniaj±c taki sam interfejs funkcji operuj±cych na
strumieniu danych.

%description -l pt_BR
A biblioteca de compressão 'zlib' oferece funções de compressão e
descompressão em memória, incluindo checagem da integridade de dados
não comprimidos. Essa versão da biblioteca suporta somente um método
de compressão (deflação) mas outros algoritmos podem ser adicionados
mais tarde e terão a mesma interface. Essa biblioteca é usada por
vários programas de sistema.

%description -l ru
âÉÂÌÉÏÔÅËÁ ËÏÍÐÒÅÓÓÉÉ zlib ÓÏÄÅÒÖÉÔ ÆÕÎËÃÉÉ ËÏÍÐÒÅÓÓÉÉ É ÄÅËÏÍÐÒÅÓÓÉÉ
× ÐÁÍÑÔÉ, ×ËÌÀÞÁÀ ÐÒÏ×ÅÒËÕ ÃÅÌÏÓÔÎÏÓÔÉ ÄÅËÏÍÐÒÅÓÓÉÒÏ×ÁÎÎÙÈ ÄÁÎÎÙÈ. üÔÁ
×ÅÒÓÉÑ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÔÏÌØËÏ ÏÄÉÎ ÍÅÔÏÄ ËÏÍÐÒÅÓÓÉÉ (deflation), ÎÏ
×ÐÏÓÌÅÄÓÔ×ÉÉ × ÎÅÅ ÍÏÇÕÔ ÂÙÔØ ÄÏÂÁ×ÌÅÎÙ É ÄÒÕÇÉÅ ÍÅÔÏÄÙ, É ×ÓÅ ÏÎÉ
ÂÕÄÕÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÔ ÖÅ ÐÏÔÏËÏ×ÙÊ ÉÎÔÅÒÆÅÊÓ.

%description -l tr
zlib sýkýþtýrma kitaplýðý bellekte sýkýþtýrma ve açma fonksiyonlarý
içermektedir. Bu sürüm yalnýzca 'deflation' yöntemini
desteklemektedir. Ancak baþka algoritmalarýn ayný arabirimle
eriþilebilecek þekilde eklenme olasýlýðý vardýr. Bu kitaplýk bir dizi
sistem yazýlýmý tarafýndan kullanýlmaktadýr.

%description -l uk
â¦Â̦ÏÔÅËÁ ËÏÍÐÒÅÓ¦§ zlib ͦÓÔÉÔØ ÆÕÎËæ§ ËÏÍÐÒÅÓ¦§ ÔÁ ÄÅËÏÍÐÒÅÓ¦§ ×
ÐÁÍ'ÑÔ¦ Ú ÐÅÒÅצÒËÏÀ æÌÏÓÔ¦ ÄÅËÏÍÐÒÅÓÏ×ÁÎÉÈ ÄÁÎÉÈ. ãÑ ×ÅÒÓ¦Ñ
ЦÄÔÒÉÍÕ¤ Ô¦ÌØËÉ ÏÄÉÎ ÍÅÔÏÄ ËÏÍÐÒÅÓ¦§ (deflation), ÁÌÅ × ÍÁÊÂÕÔÎØÏÍÕ ×
Îŧ ÍÏÖÕÔØ ÂÕÔÉ ÄÏÄÁΦ ¦ ¦ÎÛ¦ ÍÅÔÏÄÉ ¦ ×Ó¦ ×ÏÎÉ ÂÕÄÕÔØ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ
ÔÏÊ ÖÅ ÓÁÍÉÊ ÐÏÔÏËÏ×ÉÊ ¦ÎÔÅÒÆÅÊÓ.

%package dll
Summary:	zlib - DLL library for Windows
Summary(pl):	zlib - biblioteka DLL dla Windows
Group:		Applications/Emulators

%description dll
zlib - DLL library for Windows.

%description dll -l pl
zlib - biblioteka DLL dla Windows.

%prep
%setup -q -n %{realname}-%{version}
%patch2 -p1

%if %{with asmopt}
%patch0 -p1
%patch1 -p1
%ifarch i686 athlon
cp contrib/asm686/match.S .
%endif
%ifarch i586
cp contrib/asm586/match.S .
%endif
%endif

# fix for underline test
#sed -e 's/nm/%{target}-nm/' configure > configure.tmp
# but it's broken anyway (tries to use mmap test remains, but there is no mmap
# in mingw32) - so hardcode that underline is needed
sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp
mv -f configure.tmp configure
chmod +x configure

%build
CC="%{__cc}" \
CXX="%{__cxx}" \
AR="%{target}-ar rc" \
RANLIB="%{target}-ranlib" \
CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
./configure \
	--prefix=%{arch}

%{__make}
%{__make} z.dll

%if 0%{!?debug:1}
%{target}-strip -R.comment -R.note z.dll
%{target}-strip -g -R.comment -R.note *.a
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{arch}{/lib,/include}
install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system

%{__make} install \
	prefix=$RPM_BUILD_ROOT%{arch}

install zutil.h $RPM_BUILD_ROOT%{arch}/include
install libz.dll.a $RPM_BUILD_ROOT%{arch}/lib
install z.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%{arch}/include/*.h
%{arch}/lib/*

%files dll
%defattr(644,root,root,755)
%{_datadir}/wine/windows/system/*