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