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