Sophie

Sophie

distrib > Mageia > 2 > x86_64 > by-pkgid > c0a197539af1e33cfda0ca6f060812f6 > files > 4

zlib-1.2.6-1.1.mga2.src.rpm

%define	lib_major 1
%define	lib_name %mklibname %{name}%{lib_major}
%define	devel_name %mklibname %{name} -d
# for uClibc-zlib
%define	uClib_name %mklibname uClibc-%{name}%{lib_major}
%define	uClib_devel_name %mklibname uClibc-%{name} -d

%define libminizip %mklibname minizip %{lib_major}
%define minizip_devel %mklibname minizip -d

%define build_biarch 0
# Enable bi-arch build on ppc64, sparc64 and x86-64
%ifarch sparcv9 sparc64 x86_64 ppc64
%define build_biarch 1
%endif
%ifarch sparcv9
%define	_lib	lib64
%endif
%define build_minizip 1

%bcond_without uclibc
%bcond_without dietlibc

%define subrel  1

Summary:	The zlib compression and decompression library
Name:		zlib
Version:	1.2.6
Release:	%mkrel 1
Group:		System/Libraries
License:	BSD
URL:		http://www.gzip.org/zlib/
Source0:	http://prdownloads.sourceforge.net/libpng/%{name}-%{version}.tar.gz
Patch1:		zlib-1.2.6-multibuild.patch
Patch2:		zlib-1.2.5-lfs-decls.patch
BuildRequires:	setarch
%if %{with uclibc}
BuildRequires:	uClibc-devel >= 0.9.30.3-2
%endif
%if %{with dietlibc}
BuildRequires:	dietlibc-devel
%endif
%if %build_minizip
BuildRequires: zlib-devel
%endif

%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 -n	%{lib_name}
Summary:	The zlib compression and decompression library
Group:		System/Libraries
Obsoletes:	libz, libz1, %{name}
Obsoletes:	%{name}%{lib_major} < 1.2.5
Provides:	libz = %{version}-%{release} libz1 = %{version}-%{release} %{name} = %{version}-%{release}

%description -n	%{lib_name}
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 -n	%{devel_name}
Summary:	Header files and libraries for developing apps which will use zlib
Group:		Development/C
Requires:	%{lib_name} = %{version}-%{release}
Obsoletes:	libz1-devel libz-devel zlib-devel zlib1-devel
Obsoletes:	%{name}%{lib_major}-devel < 1.2.5
Provides:	libz-devel = %{version}-%{release} lib%{name}-devel = %{version}-%{release} %{name}-devel = %{version}-%{release}

%description -n	%{devel_name}
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.

%if %build_minizip
%package -n     %{libminizip}
Summary:        Minizip manipulates files from a .zip archive
Group:          System/Libraries

%description -n %{libminizip}
Minizip manipulates files from a .zip archive.

%package -n     %{minizip_devel}
Summary:        Development files for the minizip library
Group:          Development/C
Requires:       %{libminizip} = %{version}-%{release}
Requires:       zlib-devel = %{version}-%{release}
Provides:       libminizip-devel = %{version}-%{release}
Provides:       minizip-devel = %{version}-%{release}

%description -n %{minizip_devel}
This package contains the libraries and header files needed for
developing applications which use minizip.
%endif

%if %{with uclibc}
%package -n	%{uClib_name}
Summary:	The uClibc-zlib compression and decompression library
Group:		System/Libraries
Conflicts:	%{lib_name} < 1.2.5-4
Requires:	%{lib_name} = %{version}-%{release}
Provides:	uClibc-zlib = %{version}-%{release} uClibc-zlib1 = %{version}-%{release}
Obsoletes:	uClibc-zlib <= %{version}-%{release} uClibc-zlib1 <= %{version}-%{release}

%description -n	%{uClib_name}
The uClibc-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 -n	%{uClib_devel_name}
Summary:	Header files and libraries for developing apps which will use uClibc-zlib
Group:		Development/C
Conflicts:	%{devel_name} < 1.2.5-4
Requires:	%{devel_name} = %{version}-%{release}
Requires:	%{uClib_name} = %{version}-%{release}
Provides:	uClibc-zlib-devel = %{version}-%{release} uClibc-zlib1-devel = %{version}-%{release}
Obsoletes:	uClibc-zlib-devel <= %{version}-%{release} uClibc-zlib1-devel <= %{version}-%{release}

%description -n	%{uClib_devel_name}
The uClibc-zlib-devel package contains the header files and libraries
needed to develop programs that use the zlib compression and decompression
library.

Install the uClibc-zlib-devel package if you want to develop applications that
will use the uClibc-zlib library.
%endif # with uclibc

%prep
%setup -q
%patch1 -p1 -b .multibuild

%build
#(peroyvind): be sure to remove -m64/-m32 flags as they're not overridable
RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS| sed -e 's/-m.. //g'` -O3"
mkdir objs
pushd objs
  CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{?ldflags}" \
%if %{build_biarch}
  CC="%{__cc} -m64" \
%endif
  ../configure --shared --prefix=%{_prefix} --libdir=%{_libdir}
  %make
  make test
  ln -s ../zlib.3 .
popd

%if %build_minizip
pushd contrib/minizip
autoreconf --install
%configure --enable-static=no
%make
popd
%endif

%if %{build_biarch}
%ifarch %{sunsparc}
RPM_OPT_FLAGS_32="$RPM_OPT_FLAGS"
%else
RPM_OPT_FLAGS_32=`linux32 rpm --eval %%optflags`
%endif
mkdir objs32
pushd objs32
  CFLAGS="$RPM_OPT_FLAGS_32" LDFLAGS="%{?ldflags}" CC="%{__cc} -m32" \
  ../configure --shared --prefix=%{_prefix}
  %make
  make test
  ln -s ../zlib.3 .
popd
%endif

%if %{with dietlibc}
mkdir objsdietlibc
pushd objsdietlibc
  CFLAGS="-Os" CC="diet gcc" \
  ../configure --prefix=%{_prefix}
  %make libz.a
popd
%endif

%if %{with uclibc}
mkdir objsuclibc
pushd objsuclibc
  CFLAGS="%{uclibc_cflags}" LDFLAGS="%{?ldflags}" CC="%{uclibc_cc}" \
  ../configure --shared --prefix=%{_prefix}
  %make
popd
%endif

%install
rm -rf %{buildroot}

install -d %{buildroot}/%{_prefix}
install -d %{buildroot}/%{_libdir}

make install -C objs prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir}
%if %{build_biarch}
make install-libs -C objs32 prefix=%{buildroot}%{_prefix}
%endif

install -d %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/*.so.* %{buildroot}/%{_lib}/
ln -s ../../%{_lib}/libz.so.%{version} %{buildroot}%{_libdir}/

%if %build_minizip
pushd contrib/minizip
%makeinstall_std
popd
%endif

%if %{build_biarch}
install -d %{buildroot}/lib
mv %{buildroot}%{_prefix}/lib/*.so.* %{buildroot}/lib/
ln -s ../../lib/libz.so.%{version} %{buildroot}%{_prefix}/lib/
%endif

%if %{with dietlibc}
install -m644 objsdietlibc/libz.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libz.a
%endif

%if %{with uclibc}
#install -m644 objsuclibc/libz.a -D %{buildroot}%{uclibc_root}%{_libdir}/libz.a
make install-libs-only -C objsuclibc prefix=%{buildroot}%{uclibc_root} libdir=%{buildroot}%{uclibc_root}%{_libdir}
%endif

%if %build_minizip
rm -fr %{buildroot}%_libdir/libminizip.la
%endif

%clean
rm -fr %{buildroot}

%files -n %{lib_name}
%doc README
/%{_lib}/libz.so.%{lib_major}*
%{_libdir}/libz.so.%{lib_major}*
%if %{build_biarch}
/lib/libz.so.*
%{_prefix}/lib/libz.so.%{lib_major}*
%endif

%files -n %{devel_name}
%doc README ChangeLog doc/algorithm.txt
%{_mandir}/man3/zlib.3*
%{_libdir}/*.a
%{_libdir}/*.so
%if %build_minizip
%exclude %{_libdir}/libminizip.so
%endif
%{_libdir}/pkgconfig/zlib.pc
%if %{build_biarch}
%{_prefix}/lib/*.a
%{_prefix}/lib/*.so
%{_prefix}/lib/pkgconfig/zlib.pc
%endif
%{_includedir}/zconf.h
%{_includedir}/zlib.h
%if %{with dietlibc}
%{_prefix}/lib/dietlibc/lib-%{_arch}/libz.a
%endif

%if %build_minizip
%files -n %{libminizip}
%{_libdir}/libminizip.so.%{lib_major}*

%files -n %{minizip_devel}
%{_libdir}/pkgconfig/minizip.pc
%{_libdir}/libminizip.so
%{_includedir}/minizip
%endif

%if %{with uclibc}
%files -n %{uClib_name}
%{uclibc_root}%{_libdir}/libz.so.%{lib_major}*

%files -n %{uClib_devel_name}
%{uclibc_root}%{_libdir}/libz.so
%{uclibc_root}%{_libdir}/libz.a
%endif # with uclibc


%changelog

* Thu Mar 28 2013 dmorgan <dmorgan> 1.2.6-1.1.mga2
+ Revision: 406045
- Enable minizip ( needed by chromium)

  + fwang <fwang>
    - new version 1.2.6

* Fri Oct 28 2011 tmb <tmb> 1.2.5-5.mga2
+ Revision: 159068
- split out uClibc-zlib(-devel) in separate rpms so basesystem-minimal
  does not require uClibc anymore.
- drop buildroot and defattr

* Sat Jan 08 2011 blino <blino> 1.2.5-3.mga1
+ Revision: 448
- imported package zlib


* Fri Dec 17 2010 Funda Wang <fwang@mandriva.org> 1.2.5-3mdv2011.0
+ Revision: 622614
- add gentoo patch to fix building of downstream packages
- use own own ldflags

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - remove scriptlets for long dead releases

* Tue Nov 30 2010 Funda Wang <fwang@mandriva.org> 1.2.5-2mdv2011.0
+ Revision: 603298
- obsoletes old package name

* Mon Nov 29 2010 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.2.5-1mdv2011.0
+ Revision: 603123
- don't lower zlib's default compile optimization level, compile with -O3
- add versioned build dependency on clibc to ensure getting working one..
- add new pkgconfig files to %%files
- fix new path to algorithm.txt
- fix multibuild patch
- new release: 1.2.5
- drop obsolete patches fixed upstream
- ditch feeble attempt at multilib...

  + Emmanuel Andry <eandry@mandriva.org>
    - apply library policy

* Wed Jan 06 2010 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.2.3-15mdv2010.1
+ Revision: 486696
- build shared version of uclibc linked library as well, obsoleting uClibc-zlib
- use %%{uclibc_cflags} for uclibc gcc flags
- add back dietlibc build
- don't create symlinks to headers for uClibc, it's not really required...
- don't build uclibc linked library with debugging information

* Tue Dec 01 2009 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.2.3-14mdv2010.1
+ Revision: 472167
- don't split out uclibc linked zlib after all, do multiarch build in stead
- install header symlinks for uclibc
- split uclibc linked static library into a separate package
- replace dietlibc build with uclibc as dietlibc seems pretty much abandoned...

* Tue Dec 16 2008 Oden Eriksson <oeriksson@mandriva.com> 1.2.3-13mdv2009.1
+ Revision: 314890
- rediffed one fuzzy patch

* Thu Aug 07 2008 Thierry Vignaud <tv@mandriva.org> 1.2.3-12mdv2009.0
+ Revision: 266170
- rebuild early 2009.0 package (before pixel changes)

* Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 1.2.3-11mdv2009.0
+ Revision: 217581
- rebuilt against dietlibc-devel-0.32

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Tue May 20 2008 Oden Eriksson <oeriksson@mandriva.com> 1.2.3-10mdv2009.0
+ Revision: 209452
- rebuilt with gcc43

* Tue Mar 04 2008 Oden Eriksson <oeriksson@mandriva.com> 1.2.3-9mdv2008.1
+ Revision: 178766
- rebuild

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Wed Aug 15 2007 Olivier Blin <oblin@mandriva.com> 1.2.3-8mdv2008.0
+ Revision: 63510
- build dietlibc library with -Os (better, and fix weird segfault)

* Mon Aug 13 2007 Olivier Blin <oblin@mandriva.com> 1.2.3-7mdv2008.0
+ Revision: 62821
- move diet libz in _prefix/lib/dietlibc/lib-_arch (to follow gb's convention)

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - install static dietlibc library in correct place on sparc
    - package is now sparcv9 in stead of sparc64 on on sparc
    - be sure to set 64 bit environment also at link time as compiler on sparc
      defaults to 32 bit


* Thu Jan 25 2007 Olivier Blin <oblin@mandriva.com> 1.2.3-5mdv2007.0
+ Revision: 113526
- build a diet libz-diet.a archive

* Mon Dec 04 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.2.3-4mdv2007.1
+ Revision: 90324
- fix bi-arch builds with different -m32/-m64 optflags

  + Oden Eriksson <oeriksson@mandriva.com>
    - bzip2 cleanup

* Thu Oct 12 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2.3-3mdv2007.1
+ Revision: 63458
- bunzip patches
- Import zlib

* Wed Oct 05 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.2.3-2mdk
- make it a biarch package on ppc64

* Fri Jul 22 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.2.3-1mdk
- New release 1.2.3
- Drop patch 5 ( Merged Upstream )

* Thu Jul 21 2005 Olivier Blin <oblin@mandriva.com> 1.2.2.2-3mdk
- from Vincent Danen: security fix for CAN-2005-2096

* Thu Jan 20 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.2.2.2-2mdk
- make sure we are compiling DSO with -fPIC in configure tests

* Thu Jan 13 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.2.2-1mdk
- 1.2.2.2
- drop packager tag

* Thu Dec 02 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.2.1-1mdk
- 1.2.2.1

* Sat Aug 28 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.2.1.1-3mdk
- fix from Debian

* Tue Jul 13 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.1.1-2mdk
- change default compile flags only for 32 bits build when building on sparc64

* Sun May 30 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.1.1-1mdk
- 1.2.1.1
- spec cosmetics