Summary: The zlib compression and decompression library. Name: zlib Version: 1.2.2 Release: 2 Group: System Environment/Libraries Source0: ftp://ftp.uu.net/graphics/png/zlib-%{version}.tar.bz2 Source1: IBM_ILA Source2: zlib.txt Patch0: zlib-1.1.3-aixconf.patch Patch1: zlib-CAN-2005-2096.patch URL: http://www.gzip.org/zlib/ License: IBM_ILA Prefix: %{_prefix} Buildroot: /var/tmp/zlib-root %define DEFCC xlc # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{prefix}/64 %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 .CAN-2005-2096 # Put License into place cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat $RPM_SOURCE_DIR/zlib.txt >> LICENSE %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale64 >/dev/null 2>&1 mkdir 64bit cd 64bit bzip2 -dc %{SOURCE0} |tar -xf - cd %{name}-%{version} %patch0 -p1 -b .aixconf %endif %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" export OBJECT_MODE=32 #just to be sure ./configure --shared --prefix=%{_prefix} make libz.a make # We just want the shared library mv libz.a libz-static.a /usr/bin/ar -q libz.a libz.so.1 %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 ./configure --shared --prefix=%{prefix64} make libz.a make # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../.. /usr/bin/ar -q libz.a 64bit/%{name}-%{version}/libz.so.1 %endif #BUILD64 %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 install -m755 libz.a $RPM_BUILD_ROOT%{prefix}/lib/libz.a ( cd $RPM_BUILD_ROOT/%{prefix}/lib 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 -X32 -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 ) ( 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/* . ) %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc LICENSE %{_prefix}/lib/libz* /usr/lib/libz* %if %{BUILD64} == 1 %attr(755,bin,bin) %dir %{prefix64} %attr(755,bin,bin) %dir %{prefix64}/lib %{prefix64}/lib/lib*.a %endif %files devel %defattr(-,root,system) %doc README ChangeLog algorithm.txt LICENSE FAQ %{_prefix}/include/* /usr/include/* %{_prefix}/man/man3/zlib* %changelog * Thu Jul 07 2005 Philip K. Warren 1.2.2-2 - Apply security fix for CAN-2005-2096. * Thu Jun 09 2005 David Clissold 1.2.2-1 - Update to version 1.2.2. * Tue Nov 30 2004 David Clissold 1.2.1-2 - Add small security patch, backported from 1.2.2. * Tue Apr 20 2004 David Clissold 1.2.1-1 - Update to version 1.2.1. * Fri Feb 13 2004 David Clissold 1.1.4-4 - Build 64-bit library version. * 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