]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame - crossmingw32-zlib.spec
- use win32/Makefile.gcc for building (for compatibility with other zlib DLL distribu...
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
CommitLineData
d7deba55
JB
1#
2# Conditional build:
3%bcond_without asmopt # without assmbler optimization for i586+
4#
02218425 5# disable asmopt where not applicable
6%ifarch i386 i486
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
e7f727b8 17Release: 2
05100bca 18License: BSD
bfb11d2d 19Group: Development/Libraries
7d8bfb07
JB
20Source0: http://www.zlib.net/current/%{realname}-%{version}.tar.gz
21# Source0-md5: 47f6ed51b3c83a8534f9228531effa18
05100bca 22URL: http://www.zlib.org/
5d5f15b8 23BuildRequires: crossmingw32-gcc
bfb11d2d 24BuildRequires: sed >= 4.0
60c0e878 25Requires: crossmingw32-runtime
87eb21a3 26BuildRoot: %{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
46The 'zlib' compression library provides in-memory compression and
47decompression functions, including integrity checks of the
48uncompressed data. This version of the library supports only one
49compression method (deflation) but other algorithms may be added later
50and will have the same stream interface.
51
bfb11d2d 52This package contains the cross version for Win32.
05100bca 53
c31a725b
JR
54%description -l pl.UTF-8
55Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
56pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
57dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
58kompresji o nazwie deflation niemniej inne algorytmy mogą być
59dodawane udostępniając taki sam interfejs funkcji operujących na
05100bca 60strumieniu danych.
61
bfb11d2d
JB
62Ten pakiet zawiera wersję skrośną dla Win32.
63
64%package static
65Summary: Static zlib library (cross mingw32 version)
66Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna mingw32)
67Group: Development/Libraries
68Requires: %{name} = %{version}-%{release}
69
70%description static
71Static zlib library (cross mingw32 version).
72
73%description static -l pl.UTF-8
74Statyczna biblioteka zlib (wersja skrośna mingw32).
05100bca 75
0f3ccbe9 76%package dll
77Summary: zlib - DLL library for Windows
38060f2f 78Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
0f3ccbe9 79Group: Applications/Emulators
bfb11d2d 80Requires: wine
0f3ccbe9 81
82%description dll
83zlib - DLL library for Windows.
84
c31a725b 85%description dll -l pl.UTF-8
0f3ccbe9 86zlib - 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
93cp contrib/asm686/match.S .
94%endif
95%ifarch i586
96cp contrib/asm586/match.S .
97%endif
98%endif
05100bca 99
d7deba55 100%build
e7f727b8
AF
101%{__make} -fwin32/Makefile.gcc all \
102 CC="%{__cc}" \
103 CXX="%{__cxx}" \
104 AR="%{target}-ar" \
105 RANLIB="%{target}-ranlib" \
106 CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
107 DLLWRAP="%{target}-dllwrap" \
108 RC="%{target}-windres" \
109 prefix="%{_prefix}" \
110 CP="install" \
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.
e7f727b8 124library_names='libzdll.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}
165install libzdll.a $RPM_BUILD_ROOT%{_libdir}
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)
e7f727b8 178%{_libdir}/libzdll.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.100652 seconds and 4 git commands to generate.