]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame_incremental - crossmingw32-zlib.spec
- updated to 1.2.8
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without asmopt # without assembler optimization for i686+
4#
5# disable asmopt where not applicable
6%ifarch i386 i486 i586
7%undefine with_asmopt
8%endif
9%ifnarch %{ix86}
10%undefine with_asmopt
11%endif
12%define realname zlib
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
15Name: crossmingw32-%{realname}
16Version: 1.2.8
17Release: 1
18License: BSD
19Group: Development/Libraries
20Source0: http://www.zlib.net/current/%{realname}-%{version}.tar.gz
21# Source0-md5: 44d667c142d7cda120332623eab69f40
22URL: http://www.zlib.net/
23BuildRequires: crossmingw32-gcc
24BuildRequires: sed >= 4.0
25Requires: crossmingw32-runtime
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%define no_install_post_strip 1
29
30%define target i386-mingw32
31%define target_platform i386-pc-mingw32
32
33%define _sysprefix /usr
34%define _prefix %{_sysprefix}/%{target}
35%define _libdir %{_prefix}/lib
36%define _pkgconfigdir %{_prefix}/lib/pkgconfig
37%define _dlldir /usr/share/wine/windows/system
38%define __cc %{target}-gcc
39%define __cxx %{target}-g++
40%define __pkgconfig_provides %{nil}
41%define __pkgconfig_requires %{nil}
42
43%ifarch alpha sparc sparc64 sparcv9
44%define optflags -O2
45%endif
46
47# -z options are invalid for mingw linker, most of -f options are Linux-specific
48%define filterout_ld -Wl,-z,.*
49%define filterout_c -f[-a-z0-9=]*
50
51%description
52The 'zlib' compression library provides in-memory compression and
53decompression functions, including integrity checks of the
54uncompressed data. This version of the library supports only one
55compression method (deflation) but other algorithms may be added later
56and will have the same stream interface.
57
58This package contains the cross version for Win32.
59
60%description -l pl.UTF-8
61Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
62pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
63dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
64kompresji o nazwie deflation niemniej inne algorytmy mogą być
65dodawane udostępniając taki sam interfejs funkcji operujących na
66strumieniu danych.
67
68Ten pakiet zawiera wersję skrośną dla Win32.
69
70%package static
71Summary: Static zlib library (cross MinGW32 version)
72Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna MinGW32)
73Group: Development/Libraries
74Requires: %{name} = %{version}-%{release}
75
76%description static
77Static zlib library (cross MinGW32 version).
78
79%description static -l pl.UTF-8
80Statyczna biblioteka zlib (wersja skrośna MinGW32).
81
82%package dll
83Summary: zlib - DLL library for Windows
84Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
85Group: Applications/Emulators
86Requires: wine
87
88%description dll
89zlib - DLL library for Windows.
90
91%description dll -l pl.UTF-8
92zlib - biblioteka DLL dla Windows.
93
94%prep
95%setup -q -n %{realname}-%{version}
96
97%if %{with asmopt}
98%ifarch i686 athlon
99cp contrib/asm686/match.S .
100%endif
101%endif
102
103%build
104%{__make} -fwin32/Makefile.gcc all \
105 CC="%{__cc}" \
106 CXX="%{__cxx}" \
107 AR="%{target}-ar" \
108 RANLIB="%{target}-ranlib" \
109 CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \
110 DLLWRAP="%{target}-dllwrap" \
111 RC="%{target}-windres" \
112 CP="install" \
113 IMPLIB="libz.dll.a" \
114 prefix="%{_prefix}" \
115 %{?with_asmopt:OBJA=match.o}
116
117# used by libtool to detect dependencies
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).
125dlname='%{_dlldir}/zlib1.dll'
126
127# Names of this library.
128library_names='libz.dll.a'
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
155sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@\(shared\)\?libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
156 < zlib.pc.in > zlib.pc
157
158%if 0%{!?debug:1}
159%{target}-strip -R.comment -R.note zlib1.dll
160%{target}-strip -g -R.comment -R.note *.a
161%endif
162
163%install
164rm -rf $RPM_BUILD_ROOT
165install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
166
167install zlib.h $RPM_BUILD_ROOT%{_includedir}
168install zconf.h $RPM_BUILD_ROOT%{_includedir}
169install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
170install libz.a $RPM_BUILD_ROOT%{_libdir}
171install libz.la $RPM_BUILD_ROOT%{_libdir}
172install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
173install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
174
175%clean
176rm -rf $RPM_BUILD_ROOT
177
178%files
179%defattr(644,root,root,755)
180%{_libdir}/libz.dll.a
181%{_libdir}/libz.la
182%{_includedir}/zconf.h
183%{_includedir}/zlib.h
184%{_pkgconfigdir}/zlib.pc
185
186%files static
187%defattr(644,root,root,755)
188%{_libdir}/libz.a
189
190%files dll
191%defattr(644,root,root,755)
192%{_dlldir}/zlib1.dll
This page took 0.130001 seconds and 4 git commands to generate.