Express the 32 bit dependency on wxGTK-devel.
[fedora-mingw.git] / bzip2 / mingw32-bzip2.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 %define library_version 1.0.4
8
9 Name:           mingw32-bzip2
10 Version:        1.0.5
11 Release:        1%{?dist}
12 Summary:        MinGW port of bzip2 file compression utility
13
14 License:        BSD
15 Group:          Development/Libraries
16 URL:            http://www.bzip.org/
17 Source0:        http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
18 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
20 BuildArch:      noarch
21
22 Patch0:         bzip2-1.0.4-saneso.patch
23 Patch5:         bzip2-1.0.4-cflags.patch
24 Patch6:         bzip2-1.0.4-bzip2recover.patch
25
26 Patch10:        mingw32-bzip2-1.0.5-slash.patch
27 Patch11:        mingw32-bzip2-1.0.5-dll.patch
28
29 BuildRequires:  mingw32-filesystem >= 26
30 BuildRequires:  mingw32-gcc
31 BuildRequires:  mingw32-binutils
32
33 # This is needed to run the tests.
34 BuildRequires:  wine
35
36
37 %description
38 Bzip2 is a freely available, patent-free, high quality data compressor.
39 Bzip2 compresses files to within 10 to 15 percent of the capabilities 
40 of the best techniques available.  However, bzip2 has the added benefit 
41 of being approximately two times faster at compression and six times 
42 faster at decompression than those techniques.  Bzip2 is not the 
43 fastest compression utility, but it does strike a balance between speed 
44 and compression capability.
45
46 This package contains development tools and libraries for use when
47 cross-compiling Windows software in Fedora.
48
49
50 %prep
51 %setup -q -n bzip2-%{version}
52
53 %patch0 -p1 -b .saneso
54 %patch5 -p1 -b .cflags
55 %patch6 -p1 -b .bz2recover
56
57 %patch10 -p1 -b .slash
58 %patch11 -p1 -b .dll
59
60
61 %build
62 make -f Makefile-libbz2_so \
63         CC="%{_mingw32_cc}" \
64         AR="%{_mingw32_ar}" \
65         RANLIB="%{_mingw32_ranlib}" \
66         CFLAGS="%{_mingw32_cflags} -D_FILE_OFFSET_BITS=64" \
67         %{?_smp_mflags} all
68
69 rm -f *.o
70 make CC="%{_mingw32_cc}" \
71      AR="%{_mingw32_ar}" \
72      RANLIB="%{_mingw32_ranlib}" \
73      CFLAGS="%{_mingw32_cflags} -D_FILE_OFFSET_BITS=64" \
74      %{?_smp_mflags} all
75
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 make PREFIX=$RPM_BUILD_ROOT%{_mingw32_prefix} install
80
81 # The binaries which are symlinks contain the full buildroot
82 # name in the symlink, so replace those.
83 pushd $RPM_BUILD_ROOT%{_mingw32_bindir}
84 rm bzcmp bzegrep bzfgrep bzless
85 ln -s bzdiff bzcmp
86 ln -s bzgrep bzegrep
87 ln -s bzgrep bzfgrep
88 ln -s bzmore bzless
89 popd
90
91 # Remove the manpages, they're duplicates of the native package,
92 # and located in the wrong place anyway.
93 rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/man
94
95 # The Makefile doesn't install the DLL.
96 install bz2.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}/
97 install bz2-1.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/
98
99 # Remove the static library.
100 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libbz2.a
101
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106
107 %files
108 %defattr(-,root,root)
109
110 %{_mingw32_bindir}/bz2-1.dll
111 %{_mingw32_libdir}/bz2.dll.a
112
113 %{_mingw32_bindir}/bunzip2
114 %{_mingw32_bindir}/bzcat
115 %{_mingw32_bindir}/bzcmp
116 %{_mingw32_bindir}/bzdiff
117 %{_mingw32_bindir}/bzegrep
118 %{_mingw32_bindir}/bzfgrep
119 %{_mingw32_bindir}/bzgrep
120 %{_mingw32_bindir}/bzip2
121 %{_mingw32_bindir}/bzip2recover
122 %{_mingw32_bindir}/bzless
123 %{_mingw32_bindir}/bzmore
124
125 %{_mingw32_includedir}/bzlib.h
126
127
128 %changelog
129 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 1.0.5-1
130 - Initial RPM release.