| 1 |
|
|---|
| 2 | Summary: A file compression utility
|
|---|
| 3 | Name: bzip2
|
|---|
| 4 | Version: 1.0.6
|
|---|
| 5 | Release: 5%{?dist}
|
|---|
| 6 | License: BSD
|
|---|
| 7 | Group: Applications/File
|
|---|
| 8 | URL: http://www.bzip.org/
|
|---|
| 9 | Source: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
|
|---|
| 10 | Patch0: bzip2-os2.diff
|
|---|
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 12 |
|
|---|
| 13 | %description
|
|---|
| 14 | Bzip2 is a freely available, patent-free, high quality data compressor.
|
|---|
| 15 | Bzip2 compresses files to within 10 to 15 percent of the capabilities
|
|---|
| 16 | of the best techniques available. However, bzip2 has the added benefit
|
|---|
| 17 | of being approximately two times faster at compression and six times
|
|---|
| 18 | faster at decompression than those techniques. Bzip2 is not the
|
|---|
| 19 | fastest compression utility, but it does strike a balance between speed
|
|---|
| 20 | and compression capability.
|
|---|
| 21 |
|
|---|
| 22 | Install bzip2 if you need a compression utility.
|
|---|
| 23 |
|
|---|
| 24 | %package devel
|
|---|
| 25 | Summary: Header files developing apps which will use bzip2
|
|---|
| 26 | Group: Development/Libraries
|
|---|
| 27 | Requires: bzip2-libs = %{version}-%{release}
|
|---|
| 28 |
|
|---|
| 29 | %description devel
|
|---|
| 30 |
|
|---|
| 31 | Header files and a library of bzip2 functions, for developing apps
|
|---|
| 32 | which will use the library.
|
|---|
| 33 |
|
|---|
| 34 | %package libs
|
|---|
| 35 | Summary: Libraries for applications using bzip2
|
|---|
| 36 | Group: System Environment/Libraries
|
|---|
| 37 |
|
|---|
| 38 | %description libs
|
|---|
| 39 |
|
|---|
| 40 | Libraries for applications using the bzip2 compression format.
|
|---|
| 41 |
|
|---|
| 42 | %prep
|
|---|
| 43 | # -D Do not delete the directory before unpacking.
|
|---|
| 44 | # -T Disable the automatic unpacking of the archives.
|
|---|
| 45 | %setup
|
|---|
| 46 | %patch0 -p1 -b .os2~
|
|---|
| 47 |
|
|---|
| 48 | %build
|
|---|
| 49 |
|
|---|
| 50 | make -f Makefile-libbz2_so CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
|
|---|
| 51 | CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fpic -fPIC" \
|
|---|
| 52 | LDFLAGS="-g -Zbin-files -Zhigh-mem -Zdll -Zomf -Zargs-wild -Zargs-resp" \
|
|---|
| 53 | %{?_smp_mflags} dll
|
|---|
| 54 |
|
|---|
| 55 | make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
|
|---|
| 56 | CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \
|
|---|
| 57 | LDFLAGS="-g -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" \
|
|---|
| 58 | %{?_smp_mflags} all
|
|---|
| 59 |
|
|---|
| 60 | %install
|
|---|
| 61 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 62 |
|
|---|
| 63 | chmod 644 bzlib.h
|
|---|
| 64 | mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 65 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
|---|
| 66 | #mkdir -p $RPM_BUILD_ROOT%{_lib}
|
|---|
| 67 | mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 68 | mkdir -p $RPM_BUILD_ROOT%{_includedir}
|
|---|
| 69 | cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir}
|
|---|
| 70 | install -m 755 libbz2.a $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 71 | install -m 755 bzip2.exe $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 72 | install -m 755 bzip2recover.exe bzgrep bzdiff bzmore $RPM_BUILD_ROOT%{_bindir}/
|
|---|
| 73 | cp -p bzip2.1 bzdiff.1 bzgrep.1 bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
|---|
| 74 | cp bzip2.exe $RPM_BUILD_ROOT%{_bindir}/bunzip2.exe
|
|---|
| 75 | cp bzip2.exe $RPM_BUILD_ROOT%{_bindir}/bzcat.exe
|
|---|
| 76 | ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp
|
|---|
| 77 | ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless
|
|---|
| 78 | cp bz2.dll $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 79 | #ln -s ../../%{_lib}/libbz2.so.1 $RPM_BUILD_ROOT/%{_libdir}/libbz2.so
|
|---|
| 80 | ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzip2recover.1
|
|---|
| 81 | ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bunzip2.1
|
|---|
| 82 | ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1
|
|---|
| 83 | ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
|
|---|
| 84 | ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 | #%post libs -p /sbin/ldconfig
|
|---|
| 88 |
|
|---|
| 89 | #%postun libs -p /sbin/ldconfig
|
|---|
| 90 |
|
|---|
| 91 | %clean
|
|---|
| 92 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 93 |
|
|---|
| 94 | %files
|
|---|
| 95 | %defattr(-,root,root,-)
|
|---|
| 96 | %doc LICENSE CHANGES README
|
|---|
| 97 | %{_bindir}/*
|
|---|
| 98 | %{_mandir}/*/*
|
|---|
| 99 |
|
|---|
| 100 | %files libs
|
|---|
| 101 | %defattr(-,root,root,-)
|
|---|
| 102 | %doc LICENSE
|
|---|
| 103 | %{_libdir}/*.dll
|
|---|
| 104 |
|
|---|
| 105 | %files devel
|
|---|
| 106 | %defattr(-,root,root,-)
|
|---|
| 107 | %doc manual.html manual.pdf
|
|---|
| 108 | %{_includedir}/*
|
|---|
| 109 | %{_libdir}/*.a
|
|---|
| 110 |
|
|---|
| 111 | %changelog
|
|---|