]>
Commit | Line | Data |
---|---|---|
d7deba55 JB |
1 | # |
2 | # Conditional build: | |
11d24b3f | 3 | %bcond_without asmopt # without assembler optimization for i686+ |
d7deba55 | 4 | # |
02218425 | 5 | # disable asmopt where not applicable |
1712f0c9 | 6 | %ifarch i386 i486 i586 |
02218425 | 7 | %undefine with_asmopt |
8 | %endif | |
9 | %ifnarch %{ix86} | |
d7deba55 | 10 | %undefine with_asmopt |
05100bca | 11 | %endif |
05100bca | 12 | %define realname zlib |
6bf66824 JB |
13 | Summary: Library for compression and decompression - MinGW32 cross version |
14 | Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32 | |
05100bca | 15 | Name: crossmingw32-%{realname} |
84eebbab JB |
16 | Version: 1.2.6 |
17 | Release: 1 | |
05100bca | 18 | License: BSD |
bfb11d2d | 19 | Group: Development/Libraries |
7d8bfb07 | 20 | Source0: http://www.zlib.net/current/%{realname}-%{version}.tar.gz |
84eebbab | 21 | # Source0-md5: 618e944d7c7cd6521551e30b32322f4a |
11d24b3f | 22 | URL: http://www.zlib.net/ |
5d5f15b8 | 23 | BuildRequires: crossmingw32-gcc |
bfb11d2d | 24 | BuildRequires: sed >= 4.0 |
60c0e878 | 25 | Requires: crossmingw32-runtime |
87eb21a3 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
05100bca | 27 | |
28 | %define no_install_post_strip 1 | |
29 | ||
30 | %define target i386-mingw32 | |
e1a61953 | 31 | %define target_platform i386-pc-mingw32 |
05100bca | 32 | |
e1a61953 | 33 | %define _sysprefix /usr |
34 | %define _prefix %{_sysprefix}/%{target} | |
c4b70c8c | 35 | %define _libdir %{_prefix}/lib |
7d8bfb07 | 36 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
bfb11d2d | 37 | %define _dlldir /usr/share/wine/windows/system |
05100bca | 38 | %define __cc %{target}-gcc |
39 | %define __cxx %{target}-g++ | |
40 | ||
d3bc92cc | 41 | %ifarch alpha sparc sparc64 sparcv9 |
42 | %define optflags -O2 | |
43 | %endif | |
44 | ||
05100bca | 45 | %description |
46 | The 'zlib' compression library provides in-memory compression and | |
47 | decompression functions, including integrity checks of the | |
48 | uncompressed data. This version of the library supports only one | |
49 | compression method (deflation) but other algorithms may be added later | |
50 | and will have the same stream interface. | |
51 | ||
bfb11d2d | 52 | This package contains the cross version for Win32. |
05100bca | 53 | |
c31a725b JR |
54 | %description -l pl.UTF-8 |
55 | Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w | |
56 | pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie | |
57 | dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę | |
58 | kompresji o nazwie deflation niemniej inne algorytmy mogą być | |
59 | dodawane udostępniając taki sam interfejs funkcji operujących na | |
05100bca | 60 | strumieniu danych. |
61 | ||
bfb11d2d JB |
62 | Ten pakiet zawiera wersję skrośną dla Win32. |
63 | ||
64 | %package static | |
6bf66824 JB |
65 | Summary: Static zlib library (cross MinGW32 version) |
66 | Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna MinGW32) | |
bfb11d2d JB |
67 | Group: Development/Libraries |
68 | Requires: %{name} = %{version}-%{release} | |
69 | ||
70 | %description static | |
6bf66824 | 71 | Static zlib library (cross MinGW32 version). |
bfb11d2d JB |
72 | |
73 | %description static -l pl.UTF-8 | |
6bf66824 | 74 | Statyczna biblioteka zlib (wersja skrośna MinGW32). |
05100bca | 75 | |
0f3ccbe9 | 76 | %package dll |
77 | Summary: zlib - DLL library for Windows | |
38060f2f | 78 | Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows |
0f3ccbe9 | 79 | Group: Applications/Emulators |
bfb11d2d | 80 | Requires: wine |
0f3ccbe9 | 81 | |
82 | %description dll | |
83 | zlib - DLL library for Windows. | |
84 | ||
c31a725b | 85 | %description dll -l pl.UTF-8 |
0f3ccbe9 | 86 | zlib - biblioteka DLL dla Windows. |
87 | ||
05100bca | 88 | %prep |
89 | %setup -q -n %{realname}-%{version} | |
05100bca | 90 | |
d7deba55 | 91 | %if %{with asmopt} |
05100bca | 92 | %ifarch i686 athlon |
93 | cp contrib/asm686/match.S . | |
94 | %endif | |
05100bca | 95 | %endif |
05100bca | 96 | |
d7deba55 | 97 | %build |
e7f727b8 AF |
98 | %{__make} -fwin32/Makefile.gcc all \ |
99 | CC="%{__cc}" \ | |
100 | CXX="%{__cxx}" \ | |
101 | AR="%{target}-ar" \ | |
102 | RANLIB="%{target}-ranlib" \ | |
80a23771 | 103 | CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \ |
e7f727b8 AF |
104 | DLLWRAP="%{target}-dllwrap" \ |
105 | RC="%{target}-windres" \ | |
e7f727b8 | 106 | CP="install" \ |
1712f0c9 JB |
107 | IMPLIB="libz.dll.a" \ |
108 | prefix="%{_prefix}" \ | |
7d8bfb07 | 109 | %{?with_asmopt:OBJA=match.o} |
0f3ccbe9 | 110 | |
bfb11d2d | 111 | # used by libtool to detect dependencies |
e1a61953 | 112 | cat << "EOF" >> libz.la |
113 | # libz.la - a libtool library file | |
114 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | |
115 | # ^^^^ This line needs to stay | |
116 | # Made by czarny czarny at pld-linux.org | |
117 | ||
118 | # The name that we can dlopen(3). | |
99525160 | 119 | dlname='%{_dlldir}/zlib1.dll' |
e1a61953 | 120 | |
121 | # Names of this library. | |
1712f0c9 | 122 | library_names='libz.dll.a' |
e1a61953 | 123 | |
124 | # The name of the static archive. | |
125 | old_library='libz.a' | |
126 | ||
127 | # Libraries that this one depends upon. | |
128 | dependency_libs='' | |
129 | ||
130 | # Version information for libz. | |
131 | current=0 | |
132 | age=0 | |
133 | revision=0 | |
134 | ||
135 | # Is this an already installed library? | |
136 | installed=yes | |
137 | ||
138 | # Should we warn about portability when linking against -modules? | |
139 | shouldnotlink=no | |
140 | ||
141 | # Files to dlopen/dlpreopen | |
142 | dlopen='' | |
143 | dlpreopen='' | |
144 | ||
145 | # Directory that this library needs to be installed in: | |
146 | libdir='%{_libdir}' | |
147 | EOF | |
148 | ||
1df373ae | 149 | sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@\(shared\)\?libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \ |
e7f727b8 AF |
150 | < zlib.pc.in > zlib.pc |
151 | ||
c872987c | 152 | %if 0%{!?debug:1} |
e7f727b8 | 153 | %{target}-strip -R.comment -R.note zlib1.dll |
0f3ccbe9 | 154 | %{target}-strip -g -R.comment -R.note *.a |
c872987c | 155 | %endif |
05100bca | 156 | |
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
e7f727b8 | 159 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}} |
d7deba55 | 160 | |
e7f727b8 AF |
161 | install zlib.h $RPM_BUILD_ROOT%{_includedir} |
162 | install zconf.h $RPM_BUILD_ROOT%{_includedir} | |
1712f0c9 | 163 | install libz.dll.a $RPM_BUILD_ROOT%{_libdir} |
e7f727b8 | 164 | install libz.a $RPM_BUILD_ROOT%{_libdir} |
e1a61953 | 165 | install libz.la $RPM_BUILD_ROOT%{_libdir} |
e7f727b8 AF |
166 | install zlib1.dll $RPM_BUILD_ROOT%{_dlldir} |
167 | install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
bfb11d2d | 168 | |
05100bca | 169 | %clean |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | ||
172 | %files | |
d7deba55 | 173 | %defattr(644,root,root,755) |
1712f0c9 | 174 | %{_libdir}/libz.dll.a |
bfb11d2d | 175 | %{_libdir}/libz.la |
7d8bfb07 JB |
176 | %{_includedir}/zconf.h |
177 | %{_includedir}/zlib.h | |
7d8bfb07 | 178 | %{_pkgconfigdir}/zlib.pc |
bfb11d2d JB |
179 | |
180 | %files static | |
181 | %defattr(644,root,root,755) | |
182 | %{_libdir}/libz.a | |
0f3ccbe9 | 183 | |
184 | %files dll | |
185 | %defattr(644,root,root,755) | |
e7f727b8 | 186 | %{_dlldir}/zlib1.dll |