]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blame - crossmingw32-zlib.spec
- updated to 1.3.1
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
CommitLineData
d7deba55
JB
1#
2# Conditional build:
ea9d10b7
JB
3%bcond_with asmopt # without assembler optimization for i686+
4 # (asm is unsupported by upstream and unmaintained)
d7deba55 5#
02218425 6# disable asmopt where not applicable
1712f0c9 7%ifarch i386 i486 i586
02218425 8%undefine with_asmopt
9%endif
10%ifnarch %{ix86}
d7deba55 11%undefine with_asmopt
05100bca 12%endif
05100bca 13%define realname zlib
6bf66824
JB
14Summary: Library for compression and decompression - MinGW32 cross version
15Summary(pl.UTF-8): Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32
05100bca 16Name: crossmingw32-%{realname}
04275f22 17Version: 1.3.1
ea9d10b7 18Release: 1
05100bca 19License: BSD
bfb11d2d 20Group: Development/Libraries
04275f22
JB
21Source0: https://www.zlib.net/%{realname}-%{version}.tar.gz
22# Source0-md5: 9855b6d802d7fe5b7bd5b196a2271655
23URL: https://www.zlib.net/
5d5f15b8 24BuildRequires: crossmingw32-gcc
bfb11d2d 25BuildRequires: sed >= 4.0
60c0e878 26Requires: crossmingw32-runtime
87eb21a3 27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
05100bca 28
29%define no_install_post_strip 1
01e1d217 30%define _enable_debug_packages 0
05100bca 31
32%define target i386-mingw32
e1a61953 33%define target_platform i386-pc-mingw32
05100bca 34
e1a61953 35%define _sysprefix /usr
36%define _prefix %{_sysprefix}/%{target}
c4b70c8c 37%define _libdir %{_prefix}/lib
7d8bfb07 38%define _pkgconfigdir %{_prefix}/lib/pkgconfig
bfb11d2d 39%define _dlldir /usr/share/wine/windows/system
05100bca 40%define __cc %{target}-gcc
41%define __cxx %{target}-g++
c08184bb 42%define __pkgconfig_provides %{nil}
16bc62dc 43%define __pkgconfig_requires %{nil}
05100bca 44
d3bc92cc 45%ifarch alpha sparc sparc64 sparcv9
46%define optflags -O2
47%endif
48
b5e44878
ER
49# -z options are invalid for mingw linker, most of -f options are Linux-specific
50%define filterout_ld -Wl,-z,.*
51%define filterout_c -f[-a-z0-9=]*
52
05100bca 53%description
54The 'zlib' compression library provides in-memory compression and
55decompression functions, including integrity checks of the
56uncompressed data. This version of the library supports only one
57compression method (deflation) but other algorithms may be added later
58and will have the same stream interface.
59
bfb11d2d 60This package contains the cross version for Win32.
05100bca 61
c31a725b
JR
62%description -l pl.UTF-8
63Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
64pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
65dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
66kompresji o nazwie deflation niemniej inne algorytmy mogą być
67dodawane udostępniając taki sam interfejs funkcji operujących na
05100bca 68strumieniu danych.
69
bfb11d2d
JB
70Ten pakiet zawiera wersję skrośną dla Win32.
71
72%package static
6bf66824
JB
73Summary: Static zlib library (cross MinGW32 version)
74Summary(pl.UTF-8): Statyczna biblioteka zlib (wersja skrośna MinGW32)
bfb11d2d
JB
75Group: Development/Libraries
76Requires: %{name} = %{version}-%{release}
77
78%description static
6bf66824 79Static zlib library (cross MinGW32 version).
bfb11d2d
JB
80
81%description static -l pl.UTF-8
6bf66824 82Statyczna biblioteka zlib (wersja skrośna MinGW32).
05100bca 83
0f3ccbe9 84%package dll
85Summary: zlib - DLL library for Windows
38060f2f 86Summary(pl.UTF-8): zlib - biblioteka DLL dla Windows
0f3ccbe9 87Group: Applications/Emulators
bfb11d2d 88Requires: wine
0f3ccbe9 89
90%description dll
91zlib - DLL library for Windows.
92
c31a725b 93%description dll -l pl.UTF-8
0f3ccbe9 94zlib - biblioteka DLL dla Windows.
95
05100bca 96%prep
97%setup -q -n %{realname}-%{version}
05100bca 98
d7deba55 99%if %{with asmopt}
05100bca 100%ifarch i686 athlon
101cp contrib/asm686/match.S .
102%endif
05100bca 103%endif
05100bca 104
d7deba55 105%build
e7f727b8
AF
106%{__make} -fwin32/Makefile.gcc all \
107 CC="%{__cc}" \
108 CXX="%{__cxx}" \
109 AR="%{target}-ar" \
110 RANLIB="%{target}-ranlib" \
80a23771 111 CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \
e7f727b8
AF
112 DLLWRAP="%{target}-dllwrap" \
113 RC="%{target}-windres" \
e7f727b8 114 CP="install" \
1712f0c9
JB
115 IMPLIB="libz.dll.a" \
116 prefix="%{_prefix}" \
7d8bfb07 117 %{?with_asmopt:OBJA=match.o}
0f3ccbe9 118
bfb11d2d 119# used by libtool to detect dependencies
e1a61953 120cat << "EOF" >> libz.la
121# libz.la - a libtool library file
122# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
123# ^^^^ This line needs to stay
124# Made by czarny czarny at pld-linux.org
125
126# The name that we can dlopen(3).
99525160 127dlname='%{_dlldir}/zlib1.dll'
e1a61953 128
129# Names of this library.
1712f0c9 130library_names='libz.dll.a'
e1a61953 131
132# The name of the static archive.
133old_library='libz.a'
134
135# Libraries that this one depends upon.
136dependency_libs=''
137
138# Version information for libz.
139current=0
140age=0
141revision=0
142
143# Is this an already installed library?
144installed=yes
145
146# Should we warn about portability when linking against -modules?
147shouldnotlink=no
148
149# Files to dlopen/dlpreopen
150dlopen=''
151dlpreopen=''
152
153# Directory that this library needs to be installed in:
154libdir='%{_libdir}'
155EOF
156
1df373ae 157sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@\(shared\)\?libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
e7f727b8
AF
158 < zlib.pc.in > zlib.pc
159
c872987c 160%if 0%{!?debug:1}
e7f727b8 161%{target}-strip -R.comment -R.note zlib1.dll
0f3ccbe9 162%{target}-strip -g -R.comment -R.note *.a
c872987c 163%endif
05100bca 164
165%install
166rm -rf $RPM_BUILD_ROOT
e7f727b8 167install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
d7deba55 168
e7f727b8
AF
169install zlib.h $RPM_BUILD_ROOT%{_includedir}
170install zconf.h $RPM_BUILD_ROOT%{_includedir}
1712f0c9 171install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
e7f727b8 172install libz.a $RPM_BUILD_ROOT%{_libdir}
e1a61953 173install libz.la $RPM_BUILD_ROOT%{_libdir}
e7f727b8
AF
174install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
175install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
bfb11d2d 176
05100bca 177%clean
178rm -rf $RPM_BUILD_ROOT
179
180%files
d7deba55 181%defattr(644,root,root,755)
1712f0c9 182%{_libdir}/libz.dll.a
bfb11d2d 183%{_libdir}/libz.la
7d8bfb07
JB
184%{_includedir}/zconf.h
185%{_includedir}/zlib.h
7d8bfb07 186%{_pkgconfigdir}/zlib.pc
bfb11d2d
JB
187
188%files static
189%defattr(644,root,root,755)
190%{_libdir}/libz.a
0f3ccbe9 191
192%files dll
193%defattr(644,root,root,755)
e7f727b8 194%{_dlldir}/zlib1.dll
This page took 0.166168 seconds and 4 git commands to generate.