-Summary: Extremely powerful file compression utility
-Name: bzip2
-Version: 0.9.0
-Release: 1
-Copyright: Distributable (see LICENSE)
-Vendor: Julian Seward <jseward@acm.org>
-Group: Utilities/Archiving
-Source: http://www.muraroa.demon.co.uk/%{name}-%{version}.tar.gz
-BuildRoot: /tmp/%{name}-%{version}-root
+Summary: Extremely powerful file compression utility
+Summary(es): Un compresor de archivos con un nuevo algoritmo
+Summary(fr): Utilitaire de compression de fichier extrêmement puissant
+Summary(pl): Kompresor plików bzip2
+Summary(pt_BR): Compactador de arquivo extremamente poderoso
+Summary(uk): ëÏÍÐÒÅÓÏÒ ÆÁÊÌ¦× ÎÁ ÂÁÚ¦ ÁÌÇÏÒÉÔÍÕ ÂÌÏÞÎÏÇÏ ÓÏÒÔÕ×ÁÎÎÑ
+Summary(ru): ëÏÍÐÒÅÓÓÏÒ ÆÁÊÌÏ× ÎÁ ÏÓÎÏ×Å ÁÌÇÏÒÉÔÍÁ ÂÌÏÞÎÏÊ ÓÏÒÔÉÒÏ×ËÉ
+Name: bzip2
+Version: 1.0.2
+Release: 9
+Epoch: 0
+License: BSD-like
+Group: Applications/Archiving
+Source0: ftp://sources.redhat.com/pub/bzip2/v102/%{name}-%{version}.tar.gz
+# Source0-md5: ee76864958d568677f03db8afad92beb
+Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source1-md5: 5ffc3dbdd40080a8c22c3b4c3143cdd7
+Patch0: %{name}-libtoolizeautoconf.patch
+URL: http://sources.redhat.com/bzip2/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+%ifarch amd64 ia64 ppc64 sparc64
+Provides: libbz2.so.1.0()(64bit)
+%else
+Provides: libbz2.so.1.0
+%endif
+Obsoletes: libbzip2
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%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.
+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.
-The command-line options are deliberately very similar to those of GNU Gzip,
-but they are not identical.
+%description -l es
+Bzip2 es un programa de compresión/descompresión. Típicamente el
+archivo compactado queda entre 20 la 30 por ciento menor de que se
+fuera compactado con gzip. Observa que bzip2 no entiende los archivos
+del bzip original, ni los archivos del gzip.
+
+%description -l fr
+Bzip2 compresse des fichiers en utilisant l'algorithme de compression
+en tri de blocks de texte Burrows-Wheeler, et le codage Huffman. La
+compression est considérablement meilleure que celle effectuée par les
+plus conventionels compresseurs basés sur LZ77/LZ78, et approche la
+performance de la famille PPM de compresseurs statistiques.
+
+%description -l pl
+Kompresor bzip2 u¿ywa algorytmu Burrows-Wheelera do kompresji danych i
+metody Huffmana do ich kodowania. Kompresja pliku czy archiwum tar
+jest z regu³y lepsza ni¿ w przypadku stosowania klasycznych
+kompresorów LZ77/LZ78. Opcje linii poleceñ s± bardzo podobne do
+poleceñ GNU Gzip ale nie s± identyczne.
+
+%description -l pt_BR
+Bzip2 é um programa de compressão/descompressão. Tipicamente o arquivo
+compactado fica 20 a 30 por cento menor do que se fosse compactado com
+o gzip.
+
+Note que o bzip2 não entende os arquivos do bzip original, nem os
+arquivos do gzip.
+
+%description -l ru
+bzip2 ËÏÍÐÒÅÓÓÉÒÕÅÔ ÆÁÊÌÙ ÉÓÐÏÌØÚÕÑ ËÏÍÐÒÅÓÓÉÒÕÀÝÉÊ ÔÅËÓÔÏ×ÙÊ ÁÌÇÏÒÉÔÍ
+ÂÌÏÞÎÏÊ ÓÏÒÔÉÒÏ×ËÉ Burrows-Wheeler É ËÏÄÉÒÏ×ÁÎÉÅ Huffman'Á.
+äÏÓÔÉÇÁÅÍÁÑ ËÏÍÐÒÅÓÓÉÑ ÏÂÙÞÎÏ ÓÕÝÅÓÔ×ÅÎÎÏ ÌÕÞÛÅ ÄÏÓÔÉÇÁÅÍÏÊ ÂÏÌÅÅ
+ÐÒÉ×ÙÞÎÙÍÉ ËÏÍÐÒÅÓÓÏÒÁÍÉ ÎÁ ÏÓÎÏ×Å LZ77/LZ78 É ÐÒÉÂÌÉÖÁÅÔÓÑ Ë ÔÏÊ,
+ËÏÔÏÒÕÀ ÏÂÅÓÐÅÞÉ×ÁÅÔ ÓÅÍÅÊÓÔ×Ï ÓÔÁÔÉÓÔÉÞÅÓËÉÈ ËÏÍÐÒÅÓÓÏÒÏ× PPM.
+
+%description -l uk
+bzip2 ËÏÍÐÒÅÓÕ¤ ÆÁÊÌÉ ×ÉËÏÒÉÓÔÏ×ÕÀÞÉ ÔÅËÓÔÏ×ÉÊ ÁÌÇÏÒÉÔÍ ÂÌÏÞÎÏÇÏ
+ÓÏÒÔÕ×ÁÎÎÑ Burrows-Wheeler ÔÁ ËÏÄÕ×ÁÎÎÑ Huffman'Á. ëÏÍÐÒÅÓ¦Ñ, ÑËÁ
+ÄÏÓÑÇÁ¤ÔØÓÑ bzip2, ÑË ÐÒÁ×ÉÌÏ ËÒÁÝÁ ÚÁ ÔÕ, ÝÏ ÚÁÂÅÚÐÅÞÕÀÔØ
+ÒÏÚÐÏ×ÓÀÄÖÅΦ ËÏÍÐÒÅÓÏÒÉ ÎÁ ÂÁÚ¦ LZ77/LZ78 ¦ ÎÁÂÌÉÖÁ¤ÔØÓÑ ÄÏ Ôϧ, ÝÏ
+§§ ÚÁÂÅÚÐÅÞÕ¤ Ó¦ÍÅÊÓÔ×Ï ÓÔÁÔÉÓÔÉÞÎÉÈ ËÏÍÐÒÅÓÏÒ¦× PPM.
+
+%package devel
+Summary: Libbz2 library header files
+Summary(es): Header files and libraries needed for bzip2 development
+Summary(fr): Librairie statique et fichiers d'en-tête pour bzip2
+Summary(pl): Pliki nag³ówkowe do libbz2
+Summary(pt_BR): Arquivos de inclusão e biblioteca de desenvolvimento para o bzip2
+Summary(uk): èÅÄÅÒÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎÑ Ú libbz2
+Summary(ru): èÅÄÅÒÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó libbz2
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Obsoletes: libbzip2-devel
+
+%description devel
+Libbz2 library header files.
+
+%description devel -l pl
+Pliki nag³ówkowe do libbz2.
+
+%description devel -l es
+This package includes the header files and libraries needed for
+developing programs using bzip2.
+
+%description devel -l pt_BR
+Este pacote inclui arquivos de inclusão e biblioteca necessário para o
+desenvolvimento de programas que usam o bzip2.
+
+%description devel -l ru
+üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÂÉÂÌÉÏÔÅËÕ É ÈÅÄÅÒÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ
+ÐÒÏÇÒÁÍÍ, ×ËÌÀÞÁÀÝÉÈ ÐÏÄÐÒÏÇÒÁÍÍÙ ËÏÍÐÒÅÓÓÉÉ/ÄÅËÏÍÐÒÅÓÓÉÉ bz2.
+
+%description devel -l uk
+ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Â¦Â̦ÏÔÅËÕ ÔÁ ÈÅÄÅÒÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ
+ÐÒÏÇÒÁÍ, Ñ˦ ×ËÌÀÞÁÀÔØ Ð¦ÄÐÒÏÇÒÁÍÉ ËÏÍÐÒÅÓ¦§/ÄÅËÏÍÐÒÅÓ¦§ bz2.
+
+%package static
+Summary: Static libbz2 library
+Summary(es): Static libraries for bzip2 development
+Summary(pl): Biblioteka statyczna libbz2
+Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com a bzip2
+Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ bzip2
+Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ bzip2
+Group: Development/Libraries
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
+
+%define specflags_ia32 -fomit-frame-pointer
+
+%description static
+Static libbz2 library.
+
+%description static -l es
+Static libraries for bzip2 development.
+
+%description static -l pl
+Biblioteka statyczna libbz2.
+
+%description static -l pt_BR
+Bibliotecas estáticas para desenvolvimento com a bzip2.
+
+%description static -l uk
+ãÅ ÏËÒÅÍÉÊ ÐÁËÅÔ Ú¦ ÓÔÁÔÉÞÎÉÍÉ Â¦Â̦ÏÔÅËÁÍÉ.
+
+%description static -l ru
+üÔÏ ÏÔÄÅÌØÎÙÊ ÐÁËÅÔ ÓÏ ÓÔÁÔÉÞÅÓËÉÍÉ ÂÉÂÌÉÏÔÅËÁÍÉ.
%prep
%setup -q
+%patch -p1
%build
-mkdir shared
-make CFLAGS="$RPM_OPT_FLAGS"
+%{__aclocal}
+%{__libtoolize}
+%{__automake}
+%{__autoconf}
+%configure
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/usr/{bin,lib,man/man1}
-install -s bzip2 bzip2recover $RPM_BUILD_ROOT/usr/bin
-ln -sf bzip2 $RPM_BUILD_ROOT/usr/bin/bunzip2
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-install bzip2.1 $RPM_BUILD_ROOT/usr/man/man1
-echo ".so bzip2.1" > $RPM_BUILD_ROOT/usr/man/man1/bunzip2.1
+# Substitute %{_bindir} in bzless.
+mv -f $RPM_BUILD_ROOT%{_bindir}/bzless{,.tmp}
+sed -e "s@%%{_bindir}@%{_bindir}@g" \
+ $RPM_BUILD_ROOT%{_bindir}/bzless.tmp > \
+ $RPM_BUILD_ROOT%{_bindir}/bzless
+rm -f $RPM_BUILD_ROOT%{_bindir}/bzless.tmp
-cat > $RPM_BUILD_ROOT/usr/bin/bzless <<EOF
-#!/bin/sh
-/usr/bin/bunzip2 -c "\$@" | /usr/bin/less
-EOF
+# standard soname was libbz2.so.1.0, libtoolizeautoconf patch broke it,
+# but ABI has not changed - provide symlink for binary compatibility
+ln -sf libbz2.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libbz2.so.1.0
+
+bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
-%attr(644, root, root, 755) %doc README LICENSE
-%attr(711, root, root) /usr/bin/*
-%attr(644, root, man) /usr/man/man1/*
-
-%changelog
-* Mon Sep 7 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [0.9-1]
-- changed base source URl to http://www.muraroa.demon.co.uk/,
-- changed Copyright:,
-- added Vendor:,
-- changed permission on bzip2 binary to 711.
-
-* Thu Aug 13 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [0.1pl2-3]
-- added -q %setup parameter,
-- changed Buildroot to /tmp/%%{name}-%%{version}-root,
-- added using %%{name} and %%{version} in Source,
-- bunzip2(1) man page is now maked as nroff include to bzip(1) instead
- making sym link to bzip2.1 (this allow compress man pages in future),
-- added %attr and %defattr macros in %files (allow build package from
- non-root account).
+%defattr(644,root,root,755)
+%doc README* NEWS Y2K_INFO
+%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%attr(755,root,root) %{_libdir}/lib*.so.1.0
+%attr(755,root,root) %{_bindir}/*
+%{_mandir}/man1/*
+%lang(es) %{_mandir}/es/man1/*
+%lang(fr) %{_mandir}/fr/man1/*
+%lang(hu) %{_mandir}/hu/man1/*
+%lang(ja) %{_mandir}/ja/man1/*
+%lang(ko) %{_mandir}/ko/man1/*
+%lang(pl) %{_mandir}/pl/man1/*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/lib*.so
+%{_libdir}/lib*.la
+%{_includedir}/*.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a