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