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