]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame - crossmingw32-zlib.spec
- fix dlname in libtool file
[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
6bf66824
JB
13Summary: Library for compression and decompression - MinGW32 cross version
14Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32
05100bca 15Name: crossmingw32-%{realname}
11d24b3f 16Version: 1.2.5
1df373ae 17Release: 3
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++
99525160
AF
42%define filterout_ld -Wl,-z,.*
43%define filterout_c -gdwarf-3
05100bca 44
d3bc92cc 45%ifarch alpha sparc sparc64 sparcv9
46%define optflags -O2
47%endif
48
05100bca 49%description
50The 'zlib' compression library provides in-memory compression and
51decompression functions, including integrity checks of the
52uncompressed data. This version of the library supports only one
53compression method (deflation) but other algorithms may be added later
54and will have the same stream interface.
55
bfb11d2d 56This package contains the cross version for Win32.
05100bca 57
c31a725b
JR
58%description -l pl.UTF-8
59Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
60pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
61dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
62kompresji o nazwie deflation niemniej inne algorytmy mogą być
63dodawane udostępniając taki sam interfejs funkcji operujących na
05100bca 64strumieniu danych.
65
bfb11d2d
JB
66Ten pakiet zawiera wersję skrośną dla Win32.
67
68%package static
6bf66824
JB
69Summary: Static zlib library (cross MinGW32 version)
70Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna MinGW32)
bfb11d2d
JB
71Group: Development/Libraries
72Requires: %{name} = %{version}-%{release}
73
74%description static
6bf66824 75Static zlib library (cross MinGW32 version).
bfb11d2d
JB
76
77%description static -l pl.UTF-8
6bf66824 78Statyczna biblioteka zlib (wersja skrośna MinGW32).
05100bca 79
0f3ccbe9 80%package dll
81Summary: zlib - DLL library for Windows
38060f2f 82Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
0f3ccbe9 83Group: Applications/Emulators
bfb11d2d 84Requires: wine
0f3ccbe9 85
86%description dll
87zlib - DLL library for Windows.
88
c31a725b 89%description dll -l pl.UTF-8
0f3ccbe9 90zlib - biblioteka DLL dla Windows.
91
05100bca 92%prep
93%setup -q -n %{realname}-%{version}
80a23771 94%patch0 -p1
c247493c 95%patch1 -p1
05100bca 96
d7deba55 97%if %{with asmopt}
05100bca 98%ifarch i686 athlon
99cp 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 118cat << "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 125dlname='%{_dlldir}/zlib1.dll'
e1a61953 126
127# Names of this library.
1712f0c9 128library_names='libz.dll.a'
e1a61953 129
130# The name of the static archive.
131old_library='libz.a'
132
133# Libraries that this one depends upon.
134dependency_libs=''
135
136# Version information for libz.
137current=0
138age=0
139revision=0
140
141# Is this an already installed library?
142installed=yes
143
144# Should we warn about portability when linking against -modules?
145shouldnotlink=no
146
147# Files to dlopen/dlpreopen
148dlopen=''
149dlpreopen=''
150
151# Directory that this library needs to be installed in:
152libdir='%{_libdir}'
153EOF
154
1df373ae 155sed -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
164rm -rf $RPM_BUILD_ROOT
e7f727b8 165install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
d7deba55 166
e7f727b8
AF
167install zlib.h $RPM_BUILD_ROOT%{_includedir}
168install zconf.h $RPM_BUILD_ROOT%{_includedir}
1712f0c9 169install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
e7f727b8 170install libz.a $RPM_BUILD_ROOT%{_libdir}
e1a61953 171install libz.la $RPM_BUILD_ROOT%{_libdir}
e7f727b8
AF
172install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
173install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
bfb11d2d
JB
174
175rm -rf $RPM_BUILD_ROOT%{_datadir}/man
e0945de1 176
05100bca 177%clean
178rm -rf $RPM_BUILD_ROOT
179
180%files
d7deba55 181%defattr(644,root,root,755)
1712f0c9 182%{_libdir}/libz.dll.a
bfb11d2d 183%{_libdir}/libz.la
7d8bfb07
JB
184%{_includedir}/zconf.h
185%{_includedir}/zlib.h
7d8bfb07 186%{_pkgconfigdir}/zlib.pc
bfb11d2d
JB
187
188%files static
189%defattr(644,root,root,755)
190%{_libdir}/libz.a
0f3ccbe9 191
192%files dll
193%defattr(644,root,root,755)
e7f727b8 194%{_dlldir}/zlib1.dll
This page took 0.092577 seconds and 4 git commands to generate.