Enable C++ compilers. Split cpp & c++ into sub-RPMs. Add gettext and iconv
[fedora-mingw.git] / zlib / mingw-zlib.spec
1 %define __os_install_post /usr/lib/rpm/brp-compress %{nil}
2
3 Name:           mingw-zlib
4 Version:        1.2.3
5 Release:        1%{?dist}
6 Summary:        MinGW Windows zlib compression library
7
8 License:        zlib
9 Group:          Development/Libraries
10 URL:            http://www.zlib.net/
11 Source0:        http://www.zlib.net/zlib-%{version}.tar.gz
12 Patch1:         zlib-win32.patch
13 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
15 BuildRequires:  mingw-gcc
16 BuildRequires:  mingw-binutils
17
18 Requires:       mingw-runtime
19
20 %description
21 MinGW Windows zlib compression library.
22
23
24 %prep
25 %setup -q -n zlib-1.2.3
26 %patch1 -p1
27
28 %build
29 CFLAGS="-O2 -g -pipe -Wall" \
30 CC=i686-pc-mingw32-gcc RANLIB=i686-pc-mingw32-ranlib ./configure
31
32 make -f win32/Makefile.gcc \
33   CC=i686-pc-mingw32-gcc \
34   AR=i686-pc-mingw32-ar \
35   RC=i686-pc-mingw32-windres \
36   DLLWRAP=i686-pc-mingw32-dllwrap \
37   STRIP=i686-pc-mingw32-strip \
38   all
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42
43 make -f win32/Makefile.gcc \
44      INCLUDE_PATH=$RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/include \
45      LIBRARY_PATH=$RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib \
46      install
47
48 mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3
49 %__install zlib.3  $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3
50
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55
56 %files
57 %defattr(-,root,root)
58 %{_prefix}/i686-pc-mingw32/sys-root/mingw/include/zconf.h
59 %{_prefix}/i686-pc-mingw32/sys-root/mingw/include/zlib.h
60 %{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libz.a
61 %{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libzdll.a
62 %{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libz.dll
63 %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/zlib.3
64
65
66 %changelog
67 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-5
68 - Initial RPM release, largely based on earlier work from several sources.