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