Name: lbzip2
Version: 0.23
Release: 2%{?dist}
Summary: Fast, multi-threaded bzip2 utility
Group: Applications/File
License: GPLv2+
URL: http://lacos.hu/
Source0: http://lacos.web.elte.hu/pub/%{name}/%{name}-%{version}.tar.gz
# merges the CFLAGS, LDFLAGS and LIBS, specified by the Fedora / RHEL build system,
# with the important flags that the lbzip2 Makefile would use on its own
Patch0: %{name}-makefile.patch
# works around a Fedora portability bug
Patch1: %{name}-lfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel >= 1.0.6, dash, sharutils
Requires: bzip2-libs >= 1.0.6
%description
lbzip2 is a multi-threaded implementation of bzip2, suited for serial and
parallel processing. On a multi-core computer, lbzip2 is commonly the fastest
bzip2 decompressor for most bz2 files found on the internet. (On dual-core
computers, the 7za utility from the p7zip package may prove more efficient.)
lbzip2 integrates nicely with GNU tar. Even on single-core computers, lbzip2
can speed up archiving in combination with tar, because lbzip2 allows
compression to overlap with disk usage to a greater extent than bzip2 does.
%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags}"
%check
unset LBZIP2 BZIP2 BZIP || true
head -c 10000000 /dev/urandom | uuencode x | tee rnd | bzip2 >rnd.bz2
./lbzip2 -c rnd >rnd.lbz2
bzip2 -d -c rnd.lbz2 | cmp - rnd
./lbzip2 -d -c rnd.lbz2 | cmp - rnd
./lbzip2 -d -c rnd.bz2 | cmp - rnd
./lbzip2 -d -c -n 1 rnd.lbz2 | cmp - rnd
./lbzip2 -d -c -n 1 rnd.bz2 | cmp - rnd
%install
rm -rf %{buildroot}
install -D -m 755 -p %{name} %{buildroot}%{_bindir}/%{name}
ln -s %{name} %{buildroot}%{_bindir}/lbunzip2
ln -s %{name} %{buildroot}%{_bindir}/lbzcat
install -D -m 644 -p %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
ln -s %{name}.1 %{buildroot}%{_mandir}/man1/lbunzip2.1
ln -s %{name}.1 %{buildroot}%{_mandir}/man1/lbzcat.1
install -D -m 644 -p malloc_trace.pl %{buildroot}%{_datadir}/%{name}/malloc_trace.pl
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc ChangeLog GPL-2.0 GPL-3.0 README
%{_bindir}/%{name}
%{_bindir}/lbzcat
%{_bindir}/lbunzip2
%doc %{_mandir}/man1/%{name}.1*
%doc %{_mandir}/man1/lbzcat.1*
%doc %{_mandir}/man1/lbunzip2.1*
%{_datadir}/%{name}
%changelog
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 09 2010 Lukas Zapletal <lzap+spam@redhat.com> - 0.23-2
- Updated files section and patches description
* Thu Nov 25 2010 Lukas Zapletal <lzap+spam@redhat.com> - 0.23-1
- Initial packaging done by original author Laszlo Ersek.