Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37578704
en ru br
ALT Linux repos
S:1.2.13-alt1
5.0: 1.2.3-alt5
4.1: 1.2.3-alt4
4.0: 1.2.3-alt4
3.0: 1.2.3-alt1

Group :: System/Libraries
RPM: zlib

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: zlib
Version: 1.2.3
Release: alt4

Summary: The zlib compression and decompression library
Summary(ru_RU.KOI8-R): Библиотека сжатия данных zlib
License: BSD-style
Group: System/Libraries
Url: http://www.zlib.net/
Packager: Dmitry V. Levin <ldv at altlinux.org>

# http://prdownloads.sourceforge.net/libpng/zlib-%version.tar.gz

# http://alumnus.caltech.edu/~madler/zlib-%version.tar.gz
# http://www.zlib.net/zlib-%version.tar.gz
Source: zlib-%version.tar

Patch0: zlib-1.2.3-up-fixes.patch
Patch1: zlib-1.2.3-alt-gzio-gzwrite-z_err.patch
Patch2: zlib-1.2.3-alt-gzio-gzerror.patch
Patch3: zlib-1.2.3-alt-gzio-gzread-transparent.patch
Patch4: zlib-1.2.3-alt-makefile.patch
Patch5: zlib-1.2.3-alt-versioning.patch
Patch6: zlib-1.2.3-rh-make-test.patch

%def_enable static

%package devel
Summary: Header files for developing apps which will use zlib
Summary(ru_RU.KOI8-R): Файлы, необходимые для разработки приложений с использованием библиотеки сжатия данных zlib
Group: Development/C
Requires: %name = %version-%release
Requires: glibc-devel

%package devel-static
Summary: Static library for developing apps which will use zlib
Summary(ru_RU.KOI8-R): Файлы, необходимые для разработки статических приложений с использованием библиотеки сжатия данных zlib
Group: Development/C
Requires: %name-devel = %version-%release

%description
The zlib compression library provides in-memory compression and
decompression functions, including integrity checks of the uncompressed
data.  This version of the library supports only one compression method
(deflation), but other algorithms may be added later, which will have
the same stream interface.  The zlib library is used by many different
system programs.

%description devel
This package contains the header files needed to develop programs
that use the zlib compression and decompression library.

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

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
find -type f -name \*.orig -delete

fgrep -B999  at  zlib.h >License
bzip2 -9k ChangeLog FAQ algorithm.txt

%build
%define _optlevel 3

OBJA=
%ifarch %ix86
%{!?_enable_debug:%add_optflags -momit-leaf-frame-pointer}
%ifarch i686
%def_enable asm
%if_enabled asm
%add_optflags -DASMV
cp -p contrib/asm686/* .
OBJA=match.o
%endif # enabled asm
%endif # i686
%endif # %ix86

%if_enabled static
CFLAGS="%optflags" ./configure --prefix=%prefix
%make_build OBJA="$OBJA"
make test
rm -f *.s *.o
%endif # enabled static

CFLAGS="%optflags %optflags_shared" ./configure --prefix=%prefix --shared
%make_build OBJA="$OBJA"
make test

%install
mkdir -p %buildroot{/%_lib,%_libdir,%_includedir,%_man3dir}

cp -a libz.so.* %buildroot/%_lib/
v=`objdump -p libz.so |awk '/SONAME/ {print $2}'`
[ -n "$v" ]
ln -s ../../%_lib/$v %buildroot%_libdir/libz.so

install -pm644 zlib.h zconf.h %buildroot%_includedir/
install -pm644 zlib.3 %buildroot%_man3dir/

%if_enabled static
install -pm644 libz.a %buildroot%_libdir/
%endif # enabled static

%define docdir %_docdir/%name-%version
mkdir -p %buildroot%docdir
install -pm644 License README {FAQ,ChangeLog,algorithm.txt}.bz2 example.c minigzip.c \
%buildroot%docdir/
cp -a examples %buildroot%docdir/

%post -p %post_ldconfig_sys
%postun -p %postun_ldconfig

%files
/%_lib/*
%dir %docdir
%docdir/License
%docdir/README

%files devel
%_libdir/*.so
%_includedir/*
%_mandir/man?/*
%docdir
%exclude %docdir/License
%exclude %docdir/README

%if_enabled static
%files devel-static
%_libdir/*.a
%endif

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin