2006-12-19 00:18:46 +01:00
|
|
|
#
|
2011-04-03 12:14:21 +02:00
|
|
|
# spec file for package zlib
|
2006-12-19 00:18:46 +01:00
|
|
|
#
|
2011-01-10 10:36:10 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-19 00:18:46 +01:00
|
|
|
#
|
2009-01-08 14:35:28 +01:00
|
|
|
# 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.
|
|
|
|
|
2007-02-02 01:33:10 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2006-12-19 00:18:46 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-04-10 13:15:42 +02:00
|
|
|
|
2007-02-02 01:33:10 +01:00
|
|
|
Name: zlib
|
2010-07-02 14:51:45 +02:00
|
|
|
License: Other uncritical OpenSource License
|
2007-02-02 01:33:10 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
Provides: libz
|
|
|
|
Obsoletes: libz
|
2009-01-08 14:35:28 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: zlib-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2011-06-06 09:38:55 +02:00
|
|
|
Version: 1.2.5_git201105272030
|
2011-05-30 09:05:01 +02:00
|
|
|
Release: 13
|
2007-02-02 01:33:10 +01:00
|
|
|
Summary: Data Compression Library
|
2010-08-13 23:57:54 +02:00
|
|
|
Url: http://www.zlib.net/
|
2011-05-16 09:15:23 +02:00
|
|
|
# git://github.com/kaffeemonster/zlib_adler32_vec.git
|
2007-02-02 01:33:10 +01:00
|
|
|
Source: zlib-%{version}.tar.bz2
|
2009-05-19 00:27:44 +02:00
|
|
|
Source1: LICENSE
|
2009-12-16 08:51:00 +01:00
|
|
|
Source2: baselibs.conf
|
2010-08-13 23:57:54 +02:00
|
|
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/Packaging/Patches
|
|
|
|
Patch0: zlib-1.2.2-format.patch
|
2010-09-17 20:45:41 +02:00
|
|
|
# PATCH-FIX-UPSTREAM zlib-lfs.patch dimstar@opensuse.org -- Properly define large file support. Patch taken from gentoo
|
|
|
|
Patch1: zlib-lfs.patch
|
2010-12-29 00:40:18 +01:00
|
|
|
# PATCH-FIX-JENGELH-PARALLEL-MAKE zlib-parallel.patch meissner@novell.com -- shared library links with libz.a
|
|
|
|
Patch2: zlib-parallel.patch
|
2011-05-30 09:04:50 +02:00
|
|
|
# PATCH-FIX-UPSTREAM: bnc#679345 --return NULL checks from 1.2.3 removed by upstream
|
|
|
|
Patch3: zlib-1.2.5-gzopen-null-check.patch
|
2007-02-02 01:33:10 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-08-13 23:57:54 +02:00
|
|
|
BuildRequires: pkgconfig
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%package devel
|
2008-04-10 13:15:42 +02:00
|
|
|
License: Other uncritical OpenSource License
|
2008-01-12 03:49:07 +01:00
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
2007-02-02 01:33:10 +01:00
|
|
|
Group: Development/Languages/C and C++
|
2010-08-13 23:57:54 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: zlib = %{version}
|
2007-02-02 01:33:10 +01:00
|
|
|
Provides: libz:/usr/include/zlib.h
|
2009-01-08 14:35:28 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: zlib-devel-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications that require the provided includes and
|
|
|
|
libraries.
|
|
|
|
|
2009-03-24 18:33:44 +01:00
|
|
|
%package devel-static
|
|
|
|
License: Other uncritical OpenSource License
|
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Requires: %{name}-devel = %{version}
|
2010-08-13 23:57:54 +02:00
|
|
|
Provides: %{name}-devel:%{_libdir}/libz.a
|
2009-03-24 18:33:44 +01:00
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications that require the provided includes and
|
|
|
|
libraries.
|
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2010-08-13 23:57:54 +02:00
|
|
|
%patch0
|
2010-12-29 00:40:18 +01:00
|
|
|
%patch1
|
|
|
|
%patch2 -p1
|
2011-05-30 09:04:50 +02:00
|
|
|
%patch3 -p1
|
2011-04-03 12:14:21 +02:00
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%build
|
2011-01-10 10:35:58 +01:00
|
|
|
# Marcus: breaks example64 in 32bit builds.
|
|
|
|
%define do_profiling 0
|
2010-12-29 00:40:18 +01:00
|
|
|
%if %{do_profiling}
|
|
|
|
profiledir=$(mktemp -d)
|
|
|
|
trap "rm -rf $profiledir" EXIT
|
|
|
|
./configure --shared
|
|
|
|
%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
|
|
|
|
time make check
|
|
|
|
make clean
|
|
|
|
%{__make} CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags}
|
|
|
|
%else
|
|
|
|
export CFLAGS="%optflags"
|
|
|
|
./configure --shared
|
2010-07-02 14:51:45 +02:00
|
|
|
%{__make} %{?_smp_mflags}
|
2010-12-29 00:40:18 +01:00
|
|
|
%endif
|
2008-01-12 03:49:07 +01:00
|
|
|
|
|
|
|
%check
|
2010-12-29 00:40:18 +01:00
|
|
|
time make check
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%install
|
2010-08-13 23:57:54 +02:00
|
|
|
mkdir -p %{buildroot}{/%{_lib},%{_libdir}}
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man3
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
2006-12-19 00:18:46 +01:00
|
|
|
make install \
|
2010-08-13 23:57:54 +02:00
|
|
|
prefix=%{buildroot}%{_prefix} \
|
|
|
|
libdir=%{buildroot}/%{_lib}
|
2009-03-20 18:57:29 +01:00
|
|
|
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
|
|
|
|
%{__rm} -v %{buildroot}/%{_lib}/libz.so
|
2006-12-19 00:18:46 +01:00
|
|
|
# static lib
|
2010-08-13 23:57:54 +02:00
|
|
|
mv %{buildroot}/%{_lib}/libz.a %{buildroot}%{_libdir}
|
|
|
|
# Move .pc file to %{_libdir}
|
|
|
|
mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
|
2006-12-19 00:18:46 +01:00
|
|
|
# manpage
|
2010-08-13 23:57:54 +02:00
|
|
|
install -m 644 zlib.3 %{buildroot}%{_mandir}/man3
|
|
|
|
install -m 644 zutil.h %{buildroot}%{_includedir}
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%clean
|
2008-01-12 03:49:07 +01:00
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/libz.so.1.2.*
|
|
|
|
/%{_lib}/libz.so.1
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2010-08-13 23:57:54 +02:00
|
|
|
%doc README ChangeLog
|
2006-12-19 00:18:46 +01:00
|
|
|
%doc %{_mandir}/man3/zlib.3.gz
|
2010-08-13 23:57:54 +02:00
|
|
|
%{_includedir}/zlib.h
|
|
|
|
%{_includedir}/zconf.h
|
|
|
|
%{_includedir}/zutil.h
|
2009-03-24 18:33:44 +01:00
|
|
|
%{_libdir}/libz.so
|
2010-08-13 23:57:54 +02:00
|
|
|
%{_libdir}/pkgconfig/zlib.pc
|
2009-03-24 18:33:44 +01:00
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libz.a
|
2006-12-19 00:18:46 +01:00
|
|
|
|
2007-05-06 17:11:46 +02:00
|
|
|
%changelog
|