# # spec file for package zlib (Version 1.2.3) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: zlib License: zlib/libpng License; zlib license. See http://zlib.net/zlib_license.html Group: System/Libraries Provides: libz Obsoletes: libz AutoReqProv: on # bug437293 %ifarch ppc64 Obsoletes: zlib-64bit %endif # Version: 1.2.3 Release: 138 Summary: Data Compression Library Source: zlib-%{version}.tar.bz2 Patch: zlib-1.2.1-make-test.patch Patch1: zlib-1.2.1-vsnprintf.patch Patch2: zlib-1.2.1-CFLAGS.dif Patch3: zlib-1.2.2-format.patch Patch4: zlib-1.2.3-visibility-support.patch Url: http://www.zlib.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). These documents are also available in other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html. Authors: -------- Rob Hooft Michael Mauldin %package devel License: Other uncritical OpenSource License Summary: Include Files and Libraries mandatory for Development Group: Development/Languages/C and C++ Provides: libz:/usr/include/zlib.h Requires: zlib = %{version} glibc-devel AutoReqProv: on # bug437293 %ifarch ppc64 Obsoletes: zlib-devel-64bit %endif # %description devel This package contains all necessary include files and libraries needed to develop applications that require the provided includes and libraries. %package devel-static License: Other uncritical OpenSource License Summary: Include Files and Libraries mandatory for Development Group: Development/Languages/C and C++ Provides: %{name}-devel:%{_libdir}/libz.a Requires: %{name}-devel = %{version} %description devel-static This package contains all necessary include files and libraries needed to develop applications that require the provided includes and libraries. %prep %setup -q %patch -p1 %patch1 %patch2 %patch3 -p1 %patch4 -p1 %build CFLAGS="$RPM_OPT_FLAGS" ./configure --shared %{__make} %{?jobs:-j%jobs} %check make test %install mkdir -p $RPM_BUILD_ROOT/{%_lib,%_libdir} mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man3 mkdir -p $RPM_BUILD_ROOT%{_includedir} make install \ prefix=$RPM_BUILD_ROOT/%{_prefix} \ libdir=$RPM_BUILD_ROOT/%{_lib} %{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so %{__rm} -v %{buildroot}/%{_lib}/libz.so # static lib make libz.a install -m 644 libz.a $RPM_BUILD_ROOT/%{_libdir} # manpage install -m 644 zlib.3 $RPM_BUILD_ROOT/%{_mandir}/man3 install -m 644 zutil.h $RPM_BUILD_ROOT%{_includedir} %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) /%{_lib}/libz.so.1.2.* /%{_lib}/libz.so.1 %files devel %defattr(-,root,root) %doc README ChangeLog algorithm.txt %doc %{_mandir}/man3/zlib.3.gz /usr/include/zlib.h /usr/include/zconf.h /usr/include/zutil.h %{_libdir}/libz.so %files devel-static %defattr(-,root,root) %{_libdir}/libz.a %changelog * Sat Mar 21 2009 crrodriguez@suse.de - there is one valid use case of static zlib in "qemu" package split a -devel-static subpackage, please do not BuildRequire this package unless you are 100%% sure you need it, if in doubt mail either the security team or me. * Fri Feb 27 2009 crrodriguez@suse.de - add patch from gentoo that makes zlib to only export its public API using GCC visibility features, this will of course break wrong code that uses private symbols - exclude static zlib, at least temporarily, in order to clearly know what is using it. * Wed Jan 07 2009 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Sat Jan 12 2008 crrodriguez@suse.de - fix library-without-ldconfig-* errors - do not delete buildroot on install section - run make test in the check section. * Thu May 03 2007 rguenther@suse.de - move documentation files to zlib-devel package * Wed Jan 31 2007 ro@suse.de - remove libgz completely (obsolete long ago) * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Sat Dec 17 2005 kukuk@suse.de - Remove unpackaged libz.so symlink * Wed Jul 20 2005 meissner@suse.de - Upgraded to 1.2.3. Security fix is now in mainline. * Mon Jul 04 2005 meissner@suse.de - fixed memory corruption problem #94926, CAN-2005-2096. * Fri Apr 01 2005 kukuk@suse.de - Remove movage of setting CFLAGS * Tue Mar 29 2005 kukuk@suse.de - Update to 1.2.2.2 - Fix compiling with gcc 3.3 and 4.0 * Mon Feb 28 2005 meissner@suse.de - Use __printf__ in format attribute to avoid printf defines. * Wed Feb 23 2005 meissner@suse.de - supply format arguments to gzprintf(). * Tue Feb 08 2005 ro@suse.de - update to 1.2.2 * Wed Aug 25 2004 ro@suse.de - updated crash patch to version from Dmitry (#44087) * Mon Aug 23 2004 ro@suse.de - added fix for crash on invalid input (#44087) * Thu Dec 04 2003 ro@suse.de - update to 1.2.1 * Fri Nov 21 2003 kukuk@suse.de - Use RPM_OPT_FLAGS - Compile with no execstack * Mon Oct 20 2003 ro@suse.de - don't build as root * Mon May 12 2003 kukuk@suse.de - Add defattr * Mon Mar 03 2003 ro@suse.de - do use vsnprintf * Sun Feb 16 2003 olh@suse.de - no absolute symlinks for libz.so * Thu Jul 25 2002 kukuk@suse.de - Rename to zlib - Splitt off zlib-devel * Fri Jul 05 2002 bk@suse.de - enable make test * Mon May 27 2002 ro@suse.de - update to 1.1.4 including the previous security patch - Returned incorrect error (Z_MEM_ERROR) on some invalid data - Avoid accesses before window for invalid distances with inflate window less than 32K. - force windowBits > 8 to avoid a bug in the encoder for a window size of 256 bytes. (A complete fix will be available in 1.1.5). * Mon Feb 25 2002 ro@suse.de - remove executable bits from manpage and include file * Thu Feb 07 2002 draht@suse.de - prevent double free() (security problem) with zlib-1.1.3-zfree.dif * Tue Dec 11 2001 froh@suse.de - fixed specfile to use %%_libdir for make install for the sake of lib64 on S/390. also updated old sparc64 %%ifarch at this point. * Tue Dec 04 2001 ro@suse.de - added Provides zlib-devel for compatibility * Tue May 01 2001 kukuk@suse.de - Minor spec file fixes for sparc64 * Thu Dec 07 2000 kukuk@suse.de - Install only shared library in /%%{_lib} * Wed Dec 06 2000 ro@suse.de - install main lib in /%%{_lib} not /usr/%%{_lib} * Mon Oct 02 2000 kukuk@suse.de - Use %%{_lib} macro * Mon Sep 25 2000 ro@suse.de - sorted * Wed Apr 05 2000 bk@suse.de - fixed BuildRoot support * Mon Apr 03 2000 bk@suse.de - added buildroot for build with dynamically linked rpm which uses libz(s390) * Thu Jan 20 2000 aj@suse.de - /usr/man -> /usr/share/man * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Tue Jul 13 1999 ro@suse.de - added zutil.h * Thu Mar 04 1999 ro@suse.de - moved from /usr/X11R6 to usr - libgz is now only a link to libz - "libgz.so.1" is provided from specfile * Tue Aug 25 1998 ro@suse.de - update to 1.1.3 * Fri Mar 20 1998 ro@suse.de - update to 1.1.2 * Mon Mar 02 1998 ro@suse.de - update to 1.1.1 * Fri Feb 27 1998 ro@suse.de - update to version 1.0.9 created own specfile for easier maintenance included man-pages