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