blob: b367188eeb2d18585efa358193ea893d17cce41b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
%define __strip %{_cygwin_strip}
%define __objdump %{_cygwin_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_cygwin_findrequires}
%define __find_provides %{_cygwin_findprovides}
# Running the tests requires Wine.
%define run_tests 0
Name: cygwin-bzip2
Version: 1.0.6
Release: 2
Summary: Cygwin port of bzip2 file compression utility
License: BSD
Group: Development/Libraries
URL: http://www.bzip.org/
Source0: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Patch6: bzip2-1.0.4-bzip2recover.patch
Patch11: bzip2-1.0.6-cygwin-dll.patch
BuildRequires: cygwin-filesystem
BuildRequires: cygwin-binutils
BuildRequires: cygwin-gcc
BuildRequires: cygwin
%if %{run_tests}
BuildRequires: wine
%endif
%description
Bzip2 is a freely available, patent-free, high quality data compressor.
Bzip2 compresses files to within 10 to 15 percent of the capabilities
of the best techniques available. However, bzip2 has the added benefit
of being approximately two times faster at compression and six times
faster at decompression than those techniques. Bzip2 is not the
fastest compression utility, but it does strike a balance between speed
and compression capability.
This package contains development tools and libraries for use when
cross-compiling Cygwin software in Fedora.
%prep
%setup -q -n bzip2-%{version}
%patch6 -p1 -b .bz2recover
%patch11 -p1 -b .dll
%build
make -f Makefile-libbz2_so \
CC="%{_cygwin_cc}" \
AR="%{_cygwin_ar}" \
RANLIB="%{_cygwin_ranlib}" \
CFLAGS="%{_cygwin_cflags}" \
%{?_smp_mflags} all
# only needed for static libs or tests
%if 0
rm -f *.o
make CC="%{_cygwin_cc}" \
AR="%{_cygwin_ar}" \
RANLIB="%{_cygwin_ranlib}" \
CFLAGS="%{_cygwin_cflags}" \
%{?_smp_mflags} \
%if %{run_tests}
all
%else
libbz2.a
%endif
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -D -m0755 cygbz2-1.dll $RPM_BUILD_ROOT%{_cygwin_bindir}/cygbz2-1.dll
install -D -m0644 bzlib.h $RPM_BUILD_ROOT%{_cygwin_includedir}/bzlib.h
install -D -m0644 libbz2.dll.a $RPM_BUILD_ROOT%{_cygwin_libdir}/libbz2.dll.a
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_cygwin_bindir}/cygbz2-1.dll
%{_cygwin_includedir}/bzlib.h
%{_cygwin_libdir}/libbz2.dll.a
%changelog
* Sun Aug 21 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.6-2
- Remove Cygwin EXEs.
* Wed Mar 16 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.6-1
- Initial spec file, largely based on mingw32-bzip2.
|