%define major 1 %define libname %mklibname %{name}_ %{major} %define devname %mklibname %{name} -d %bcond_with pdf Summary: Extremely powerful file compression utility Name: bzip2 Version: 1.0.6 Release: 14 License: BSD Group: Archiving/Compression Url: http://www.bzip.org/index.html Source0: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz Source1: bzgrep Source2: bzme Source3: bzme.1 Patch0: bzip2-1.0.6-makefile.diff Patch1: bzip2-1.0.6-CVE-2016-3189.patch BuildRequires: libtool BuildRequires: texinfo %if %{with pdf} BuildRequires: tetex-dvips BuildRequires: tetex-latex %endif Requires: mktemp Requires: %{libname} = %{EVRD} %description Bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. The command-line options are deliberately very similar to those of GNU Gzip, but they are not identical. %files %doc README LICENSE CHANGES %{_bindir}/* %{_mandir}/man1/* #---------------------------------------------------------------------------- %package -n %{libname} Summary: Libraries for developing apps which will use bzip2 Group: System/Libraries %description -n %{libname} Library of bzip2 functions, for developing apps which will use the bzip2 library (aka libz2). %files -n %{libname} %doc LICENSE /%{_lib}/libbz2.so.* %{_libdir}/libbz2.so.* #---------------------------------------------------------------------------- %package -n %{devname} Summary: Header files for developing apps which will use bzip2 Group: Development/C Requires: %{libname} = %{EVRD} Provides: lib%{name}-devel = %{EVRD} Provides: %{name}-devel = %{EVRD} Obsoletes: %{mklibname bzip2_ 1 -d} < 1.0.5-3 %description -n %{devname} Header files and static library of bzip2 functions, for developing apps which will use the bzip2 library (aka libz2). %files -n %{devname} %doc *.html LICENSE %if %{with pdf} %doc manual.pdf %endif /%{_lib}/libbz2.so %{_libdir}/libbz2.so %{_includedir}/*.h #---------------------------------------------------------------------------- %prep %setup -q %patch0 -p1 -b .makefile %patch1 -p1 -b .CVE-2016-3189 echo "lib = %{_lib}" >> config.in echo "CFLAGS = %{optflags}" >> config.in echo "LDFLAGS = %{ldflags}" >> config.in cp %{SOURCE1} bzgrep cp %{SOURCE2} bzme cp %{SOURCE3} bzme.1 %build %make -f Makefile-libbz2_so %make %if %{with pdf} texi2dvi --pdf manual.texi %endif %install %makeinstall_std install -m0755 bzme %{buildroot}%{_bindir}/ install -m0755 bzgrep %{buildroot}%{_bindir}/ install -m0644 bzgrep.1 %{buildroot}%{_mandir}/man1/ cat > %{buildroot}%{_bindir}/bzless <= 201800 echo "Remove compatibility symlinks in Rosa 2018/2019!" exit 1 %endif for i in $(/bin/ls %{buildroot}/%{_lib}); do ln -sr "%{buildroot}/%{_lib}/${i}" "%{buildroot}/%{_libdir}/${i}"; done