Репозиторий Sisyphus
Последнее обновление: 29 января 2023 | Пакетов: 18148 | Посещений: 26577519
en ru br
Репозитории ALT
5.1: 1.0.6-alt1
4.1: 1.0.6-alt0.M40.1
4.0: 1.0.6-alt0.M40.1
3.0: 1.0.3-alt5

Группа :: Архивирование/Сжатие
Пакет: bzip2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: bzip2
%define v_major 1
%define v_minor 0
%define v_patch 3
Version: %v_major.%v_minor.%v_patch
Release: alt5
Serial: 1

Summary: Extremely powerful file compression utility
License: BSD-like
Group: Archiving/Compression
Url: http://www.bzip.org/

Source: http://www.bzip.org/%version/%name-%version.tar.gz
Source2: bzlib_triggerpostun.c
Source3: %name.texi

Patch1: %name-1.0.3-alt-autotools.patch
Patch2: %name-1.0.3-alt-compat.patch
Patch3: %name-1.0.2-alt-bzdiff-tmp.patch
Patch4: %name-1.0.3-alt-fopen.patch
Patch5: %name-1.0.3-alt-const.patch
Patch6: %name-1.0.3-alt-chmod-chown.patch
Patch7: %name-1.0.3-alt-progname.patch
Patch8: %name-1.0.3-flok-show-progress.patch

Provides: /bin/bunzip, /bin/bunzip2, /bin/bzcat, /bin/bzip, /bin/bzip2
PreReq: bzlib = %version-%release

BuildPreReq: glibc-devel-static

%package -n bzlib
Summary: The bzlib compression and decompression library
Summary(ru_RU.KOI8-R): Библиотека сжатия данных bzlib
Group: System/Libraries
Provides: libbz2.so.%v_major.%v_minor, libbz2.so.%v_major, libbz2.so.0, libbz2.so.0.9
Provides: /sbin/bzlib_triggerpostun

%package -n bzlib-devel
Summary: Include files for developing apps which will use %name
Group: Development/C
Provides: %name-devel = %version, libbz2.so
Obsoletes: %name-devel
PreReq: bzlib = %version-%release
Requires(post): %install_info
Requires(preun): %uninstall_info

%package -n bzlib-devel-static
Summary: Static library for developing apps which will use %name
Group: Development/C
Provides: %name-devel-static = %version
Obsoletes: %name-devel-static
Requires: bzlib-devel = %version-%release

%package doc
Summary: Documentation for developing apps which will use %name
Group: Development/C
Requires: %name = %version-%release

bzip2 is a freely available, patent-free, high quality data compressor.

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 (such as gzip), and approaches the performance
of the PPM family of statistical compressors.  bzip2 is by far not the
fastest compression utility, but it does strike a balance between speed
and compression capability.

The command-line options are deliberately very similar to those of
GNU Gzip, but they are not identical.

%description -n bzlib
The %name compression library provides in-memory compression and
decompression functions, including integrity checks of the uncompressed
data.  The %name library is used by many different system programs.

%description -n bzlib-devel
This package contains the include files needed to develop programs that
use the %name compression and decompression library.

%description -n bzlib-devel-static
This package contains the static library needed to develop statically
linked programs that use the %name compression and decompression library.

%description doc
This package contains additional documentation on %name compression and
decompression library.

%setup -q
%patch1 -p1
sed -e 's/^\(BZ_EXTERN[[:space:]]\+.*[[:space:]]BZ_API[[:space:]]*([[:space:]]*\)BZ2_\(.*\)$/\1\2/' \
<bzlib.h >bzlib_compat.h
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
find -type f -name \*.orig -delete -print
chmod a+x *.sh
%__install -pm644 %SOURCE3 .

%define _optlevel 3
%add_optflags -Winline -momit-leaf-frame-pointer

gcc -Wall -Os -static -DVERSION='"%version"' %SOURCE2 -o bzlib_triggerpostun

autoreconf -fisv
%configure --enable-shared --enable-static
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%make_build -k check}}}


pushd %buildroot
%__mkdir_p bin sbin
mv .%_bindir/* bin/

for f in bzip bunzip; do
%__ln_s ../../bin/bzip2 .%_bindir/$f
%__ln_s bzip2.1 .%_man1dir/$f.1
for f in bzip2 bunzip2 bzcat; do
%__ln_s ../../bin/bzip2 .%_bindir/$f
for f in bzip2recover; do
%__ln_s ../../bin/$f .%_bindir/$f
%__ln_s bzip2.1 .%_man1dir/$f.1

%__mkdir_p ./%_lib
mv .%_libdir/*.so.* ./%_lib
for f in so.%v_major.%v_minor so.0.9 so.0; do
%__ln_s libbz2.so.%version ./%_lib/libbz2.$f
%__ln_s -f ../../%_lib/libbz2.so.%version .%_libdir/libbz2.so

# Our bzless and bzmore live in less package.

rm bin/bz{less,more} .%_man1dir/bz{less,more}.*

# Our bzdiff, bzcmp and bz*grep live in gzip-utils package.

rm .{/bin,%_man1dir}/{bzdiff,bzcmp,bzgrep,bzfgrep,bzegrep}*

%__install -p -m700 bzlib_triggerpostun %buildroot/sbin/

%define docdir %_docdir/%name-%version
%__rm -rf %buildroot%docdir
%__mkdir_p %buildroot%docdir
%__install -p -m644 CHANGES LICENSE README Y2K_INFO *.html %buildroot%docdir/

%post -n bzlib-devel
%install_info %name.info

%preun -n bzlib-devel
%uninstall_info %name.info

%post -n bzlib -p %post_ldconfig_sys
%postun -n bzlib -p %postun_ldconfig
%triggerpostun -n bzlib -p /sbin/bzlib_triggerpostun -- bzlib < 1:1.0.2

%files -n bzlib
%dir %docdir

%files -n bzlib-devel

%files -n bzlib-devel-static

%dir %docdir

%files doc
%dir %docdir


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin