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