Add libglade2 needed for virt-viewer
[fedora-mingw.git] / zlib / mingw32-zlib.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-zlib
8 Version:        1.2.3
9 Release:        10%{?dist}
10 Summary:        MinGW Windows zlib compression library
11
12 License:        zlib
13 Group:          Development/Libraries
14 URL:            http://www.zlib.net/
15 Source0:        http://www.zlib.net/zlib-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17 BuildArch:      noarch
18
19 # From Fedora native package, none is applicable to us.
20 #Patch3:        zlib-1.2.3-autotools.patch
21 #Patch4:        minizip-1.2.3-autotools.patch
22 #Patch5:        zlib-1.2.3-minizip.patch
23
24 # MinGW-specific patches.
25 Patch100:       zlib-win32.patch
26
27 BuildRequires:  mingw32-filesystem >= 23
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30
31
32 %description
33 MinGW Windows zlib compression library.
34
35
36 %prep
37 %setup -q -n zlib-1.2.3
38
39 %patch100 -p1
40
41
42 %build
43 CC=%{_mingw32_cc} \
44 CFLAGS="%{_mingw32_cflags}" \
45 RANLIB=%{_mingw32_ranlib} \
46 ./configure
47
48 make -f win32/Makefile.gcc \
49   CC=%{_mingw32_cc} \
50   AR=%{_mingw32_ar} \
51   RC=i686-pc-mingw32-windres \
52   DLLWRAP=i686-pc-mingw32-dllwrap \
53   STRIP=%{_mingw32_strip} \
54   all
55
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
61 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
62 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
63
64 make -f win32/Makefile.gcc \
65      INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw32_includedir} \
66      LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw32_libdir} \
67      BINARY_PATH=$RPM_BUILD_ROOT%{_mingw32_bindir} \
68      install
69
70 # .dll.a file is misnamed for some reason - fix that.
71 mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libzdll.a \
72    $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.dll.a
73
74 # Remove static library.
75 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
76
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81
82 %files
83 %defattr(-,root,root)
84 %{_mingw32_includedir}/zconf.h
85 %{_mingw32_includedir}/zlib.h
86 %{_mingw32_libdir}/libz.dll.a
87 %{_mingw32_bindir}/zlib1.dll
88
89
90 %changelog
91 * Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
92 - Consider native patches.
93
94 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
95 - Rename mingw -> mingw32.
96
97 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
98 - Remove manpage.
99
100 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
101 - Remove static library.
102
103 * Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
104 - Fix misnamed file: zlibdll.a -> zlib.dll.a
105 - Explicitly provide mingw(zlib1.dll).
106
107 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
108 - Initial RPM release, largely based on earlier work from several sources.