Summary: The zlib compression and decompression library. Name: zlib Version: 1.1.4 Release: 3 Group: System Environment/Libraries Source: ftp://ftp.uu.net/graphics/png/zlib-%{version}.tar.gz Source1: IBM_ILA Source2: zlib.txt Patch0: zlib-1.1.3-aixconf.patch Patch1: zlib-1.1.4-gzprintf.patch Url: http://www.gzip.org/zlib/ License: IBM_ILA Prefix: %{_prefix} Buildroot: /var/tmp/zlib-root %define DEFCC xlc %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. %package devel Summary: Header files and libraries for developing apps which will use zlib. Group: Development/Libraries Requires: zlib %description devel The zlib-devel package contains the header files and libraries needed to develop programs that use the zlib compression and decompression library. Install the zlib-devel package if you want to develop applications that will use the zlib library. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .aixconf %patch1 -p1 -b .gzprintf # Put License into place cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat $RPM_SOURCE_DIR/zlib.txt >> LICENSE %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi export CFLAGS="-DHAS_vsnprintf -DHAS_snprintf" ./configure --shared --prefix=%{_prefix} make libz.a make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_prefix} make install prefix=${RPM_BUILD_ROOT}%{_prefix} install -m644 zutil.h ${RPM_BUILD_ROOT}%{_prefix}/include/zutil.h mkdir -p $RPM_BUILD_ROOT%{_prefix}/man/man3 install -m644 zlib.3 $RPM_BUILD_ROOT%{_prefix}/man/man3 %ifarch ppc || %ifarch rs6000 ( cd $RPM_BUILD_ROOT/%{prefix}/lib # Create an archive rm -f libz.a ar -qv libz.a libz.so.1 rm libz.so* # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATMEMBER=shr.o for lib in *.a do /usr/bin/dump -Tv $lib |/usr/bin/awk 'match($4,"EXP|Exp") { print $NF }' > tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) %endif ( cd $RPM_BUILD_ROOT mkdir -p usr/include cd usr/include ln -sf ../..%{prefix}/include/* . cd - mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . ) %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc LICENSE %{_prefix}/lib/libz* /usr/lib/libz* %files devel %defattr(-,root,root) %doc README ChangeLog algorithm.txt LICENSE FAQ %{_prefix}/include/* /usr/include/* %{_prefix}/man/man3/zlib* %changelog * Fri May 23 2003 David Clissold - Add patch for potential buffer overflow. See CERT VU#142121. * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Mon Mar 11 2002 David Clissold - Update to version 1.1.4 * Tue Mar 20 2001 Marc Stephenson - Build both 32- and 64-bit binaries * Thu Mar 08 2001 Marc Stephenson - Handle non-gcc IA64 compilers * Wed Mar 07 2001 Marc Stephenson - Add logic for default compiler - Generate real archive on Power - Add compatibility entry for Bull freeware * Tue Feb 20 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Mon Feb 7 2000 Jeff Johnson - compress man page. * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 5) * Wed Sep 09 1998 Cristian Gafton - link against glibc * Mon Jul 27 1998 Jeff Johnson - upgrade to 1.1.3 * Fri May 08 1998 Prospector System - translations modified for de, fr, tr * Wed Apr 08 1998 Cristian Gafton - upgraded to 1.1.2 - buildroot * Tue Oct 07 1997 Donnie Barnes - added URL tag (down at the moment so it may not be correct) - made zlib-devel require zlib * Thu Jun 19 1997 Erik Troan - built against glibc