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