]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blob - crossmingw32-zlib.spec
added filterout_c for -f* options
[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.7
17 Release:        1
18 License:        BSD
19 Group:          Development/Libraries
20 Source0:        http://www.zlib.net/current/%{realname}-%{version}.tar.gz
21 # Source0-md5:  60df6a37c56e7c1366cca812414f7b85
22 URL:            http://www.zlib.net/
23 BuildRequires:  crossmingw32-gcc
24 BuildRequires:  sed >= 4.0
25 Requires:       crossmingw32-runtime
26 BuildRoot:      %{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
41 %ifarch alpha sparc sparc64 sparcv9
42 %define         optflags        -O2
43 %endif
44
45 # -z options are invalid for mingw linker, most of -f options are Linux-specific
46 %define         filterout_ld    -Wl,-z,.*
47 %define         filterout_c             -f[-a-z0-9=]*
48
49 %description
50 The 'zlib' compression library provides in-memory compression and
51 decompression functions, including integrity checks of the
52 uncompressed data. This version of the library supports only one
53 compression method (deflation) but other algorithms may be added later
54 and will have the same stream interface.
55
56 This package contains the cross version for Win32.
57
58 %description -l pl.UTF-8
59 Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
60 pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
61 dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
62 kompresji o nazwie deflation niemniej inne algorytmy mogą być
63 dodawane udostępniając taki sam interfejs funkcji operujących na
64 strumieniu danych.
65
66 Ten pakiet zawiera wersję skrośną dla Win32.
67
68 %package static
69 Summary:        Static zlib library (cross MinGW32 version)
70 Summary(pl.UTF-8):      Statyczna biblioteka zlib (wersja skrośna MinGW32)
71 Group:          Development/Libraries
72 Requires:       %{name} = %{version}-%{release}
73
74 %description static
75 Static zlib library (cross MinGW32 version).
76
77 %description static -l pl.UTF-8
78 Statyczna biblioteka zlib (wersja skrośna MinGW32).
79
80 %package dll
81 Summary:        zlib - DLL library for Windows
82 Summary(pl.UTF-8):      zlib - biblioteka DLL dla Windows
83 Group:          Applications/Emulators
84 Requires:       wine
85
86 %description dll
87 zlib - DLL library for Windows.
88
89 %description dll -l pl.UTF-8
90 zlib - biblioteka DLL dla Windows.
91
92 %prep
93 %setup -q -n %{realname}-%{version}
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='%{_dlldir}/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 %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.07054 seconds and 3 git commands to generate.