]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blob - crossmingw32-zlib.spec
- release 3 (2 disappeared)
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
1 #
2 # Conditional build:
3 %bcond_without  asmopt  # without assmbler optimization for i586+
4 #
5 # disable asmopt where not applicable
6 %ifarch i386 i486
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.3
17 Release:        3
18 License:        BSD
19 Group:          Development/Libraries
20 Source0:        http://www.zlib.net/%{realname}-%{version}.tar.gz
21 # Source0-md5:  debc62758716a169df9f62e6ab2bc634
22 Patch0:         %{realname}-asmopt.patch
23 Patch1:         %{name}-shared.patch
24 URL:            http://www.zlib.org/
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 %define         arch                    %{_prefix}/%{target}
35 %define         gccarch                 %{_prefix}/lib/gcc-lib/%{target}
36 %define         gcclib                  %{_prefix}/lib/gcc-lib/%{target}/%{version}
37
38 %define         _sysprefix              /usr
39 %define         _prefix                 %{_sysprefix}/%{target}
40 %define         _dlldir                 /usr/share/wine/windows/system
41 %define         __cc                    %{target}-gcc
42 %define         __cxx                   %{target}-g++
43
44 %ifarch alpha sparc sparc64 sparcv9
45 %define         optflags        -O2
46 %endif
47
48 %description
49 The 'zlib' compression library provides in-memory compression and
50 decompression functions, including integrity checks of the
51 uncompressed data. This version of the library supports only one
52 compression method (deflation) but other algorithms may be added later
53 and will have the same stream interface.
54
55 This package contains the cross version for Win32.
56
57 %description -l pl.UTF-8
58 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
59 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
60 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
61 kompresji o nazwie deflation niemniej inne algorytmy mogą być
62 dodawane udostępniając taki sam interfejs funkcji operujących na
63 strumieniu danych.
64
65 Ten pakiet zawiera wersję skrośną dla Win32.
66
67 %package static
68 Summary:        Static zlib library (cross mingw32 version)
69 Summary(pl.UTF-8):      Statyczna biblioteka zlib (wersja skrośna mingw32)
70 Group:          Development/Libraries
71 Requires:       %{name} = %{version}-%{release}
72
73 %description static
74 Static zlib library (cross mingw32 version).
75
76 %description static -l pl.UTF-8
77 Statyczna biblioteka zlib (wersja skrośna mingw32).
78
79 %package dll
80 Summary:        zlib - DLL library for Windows
81 Summary(pl.UTF-8):      zlib - biblioteka DLL dla Windows
82 Group:          Applications/Emulators
83 Requires:       wine
84
85 %description dll
86 zlib - DLL library for Windows.
87
88 %description dll -l pl.UTF-8
89 zlib - biblioteka DLL dla Windows.
90
91 %prep
92 %setup -q -n %{realname}-%{version}
93 %patch1 -p1
94
95 %if %{with asmopt}
96 %patch0 -p1
97 %ifarch i686 athlon
98 cp contrib/asm686/match.S .
99 %endif
100 %ifarch i586
101 cp contrib/asm586/match.S .
102 %endif
103 %endif
104
105 # fix for underline test
106 #sed -i -e 's/nm/%{target}-nm/' configure
107 # but it's broken anyway (tries to use mmap test remains, but there is no mmap
108 # in mingw32) - so hardcode that underline is needed
109 sed -i -e 's/.*grep _hello.*/if false; then/' configure
110 # vim '
111
112 %build
113 CC="%{__cc}" \
114 CXX="%{__cxx}" \
115 AR="%{target}-ar rc" \
116 RANLIB="%{target}-ranlib" \
117 CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
118 ./configure \
119         --prefix=%{_prefix}
120
121 %{__make}
122 %{__make} z.dll
123
124 # used by libtool to detect dependencies
125 cat << "EOF" >> libz.la
126 # libz.la - a libtool library file
127 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
128 # ^^^^ This line needs to stay
129 # Made by czarny czarny at pld-linux.org
130
131 # The name that we can dlopen(3).
132 dlname='../bin/libz.dll'
133
134 # Names of this library.
135 library_names='libz.dll.a'
136
137 # The name of the static archive.
138 old_library='libz.a'
139
140 # Libraries that this one depends upon.
141 dependency_libs=''
142
143 # Version information for libz.
144 current=0
145 age=0
146 revision=0
147
148 # Is this an already installed library?
149 installed=yes
150
151 # Should we warn about portability when linking against -modules?
152 shouldnotlink=no
153
154 # Files to dlopen/dlpreopen
155 dlopen=''
156 dlpreopen=''
157
158 # Directory that this library needs to be installed in:
159 libdir='%{_libdir}'
160 EOF
161
162 %if 0%{!?debug:1}
163 %{target}-strip -R.comment -R.note z.dll
164 %{target}-strip -g -R.comment -R.note *.a
165 %endif
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
170
171 %{__make} install \
172         prefix=$RPM_BUILD_ROOT%{_prefix}
173
174 install zutil.h $RPM_BUILD_ROOT%{_includedir}
175 install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
176 install libz.la $RPM_BUILD_ROOT%{_libdir}
177 install z.dll $RPM_BUILD_ROOT%{_dlldir}/libz.dll
178
179 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %files
185 %defattr(644,root,root,755)
186 %{_libdir}/libz.dll.a
187 %{_libdir}/libz.la
188 %{_includedir}/*.h
189
190 %files static
191 %defattr(644,root,root,755)
192 %{_libdir}/libz.a
193
194 %files dll
195 %defattr(644,root,root,755)
196 %{_dlldir}/libz.dll
This page took 0.069845 seconds and 4 git commands to generate.