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
|
|
|
#
|
2012-05-07 14:48:26 +02:00
|
|
|
# Copyright (c) 2012 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
|
|
|
#
|
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%bcond_with profiling
|
2011-12-27 18:39:53 +01:00
|
|
|
|
2007-02-02 01:33:10 +01:00
|
|
|
Name: zlib
|
2012-05-07 14:48:26 +02:00
|
|
|
Version: 1.2.7
|
2011-12-12 17:00:09 +01:00
|
|
|
Release: 0
|
2007-02-02 01:33:10 +01:00
|
|
|
Summary: Data Compression Library
|
2011-12-12 17:00:09 +01:00
|
|
|
License: Zlib
|
|
|
|
Group: System/Libraries
|
2010-08-13 23:57:54 +02:00
|
|
|
Url: http://www.zlib.net/
|
2012-10-15 09:45:19 +02:00
|
|
|
Source0: http://zlib.net/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
|
2012-10-15 09:45:19 +02:00
|
|
|
Source3: zlib-rpmlintrc
|
|
|
|
#PATCH-FIX-SUSE: fate#314093, sent upstream by IBM
|
|
|
|
Patch0: zlib-1.2.7-improve-longest_match-performance.patch
|
2010-08-13 23:57:54 +02:00
|
|
|
BuildRequires: pkgconfig
|
2012-10-22 07:01:46 +02:00
|
|
|
#!BuildIgnore: rpmlint-Factory
|
|
|
|
#!BuildIgnore: post-build-checks
|
2012-05-07 14:48:26 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-10-15 09:45:19 +02:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: zlib-64bit
|
|
|
|
%endif
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%description
|
2012-10-15 09:45:19 +02:00
|
|
|
zlib is designed to be a free, general-purpose, legally unencumbered -- that
|
|
|
|
is, not covered by any patents -- lossless data-compression library for use on
|
|
|
|
virtually any computer hardware and operating system. the zlib data format is
|
|
|
|
itself portable across platforms. unlike the lzw compression method used in
|
|
|
|
unix compress(1) and in the gif image format, the compression method currently
|
|
|
|
used in zlib essentially never expands the data. (lzw can double or triple the
|
|
|
|
file size in extreme cases.) zlib's memory footprint is also independent of the
|
|
|
|
input data and can be reduced, if necessary, at some cost in compression.
|
|
|
|
|
|
|
|
%package -n libz1
|
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Provides: %{name} = %{version}-%{release}
|
|
|
|
Obsoletes: %{name} < %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n libz1
|
|
|
|
zlib is designed to be a free, general-purpose, legally unencumbered -- that
|
|
|
|
is, not covered by any patents -- lossless data-compression library for use on
|
|
|
|
virtually any computer hardware and operating system. the zlib data format is
|
|
|
|
itself portable across platforms. unlike the lzw compression method used in
|
|
|
|
unix compress(1) and in the gif image format, the compression method currently
|
|
|
|
used in zlib essentially never expands the data. (lzw can double or triple the
|
|
|
|
file size in extreme cases.) zlib's memory footprint is also independent of the
|
|
|
|
input data and can be reduced, if necessary, at some cost in compression.
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%package devel
|
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
|
2012-10-15 09:45:19 +02:00
|
|
|
Requires: libz1 = %{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
|
|
|
|
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
|
2012-10-15 09:45:19 +02:00
|
|
|
%patch0 -p1
|
2011-08-29 09:12:26 +02:00
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%build
|
2011-08-29 09:12:17 +02:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
2012-10-15 09:45:19 +02:00
|
|
|
# Marcus: breaks example64 in 32bit builds, so it's disabled by default
|
|
|
|
%if %{with profiling}
|
2010-12-29 00:40:18 +01:00
|
|
|
profiledir=$(mktemp -d)
|
|
|
|
trap "rm -rf $profiledir" EXIT
|
2012-05-07 14:48:26 +02:00
|
|
|
CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
|
|
|
|
make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
|
2010-12-29 00:40:18 +01:00
|
|
|
time make check
|
|
|
|
make clean
|
2012-05-07 14:48:26 +02:00
|
|
|
make CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags}
|
2010-12-29 00:40:18 +01:00
|
|
|
%else
|
2012-05-07 14:48:26 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
|
|
|
|
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
|
2011-12-27 18:39:53 +01:00
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
2012-05-07 14:48:26 +02:00
|
|
|
%make_install
|
|
|
|
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}
|
2012-10-15 09:45:19 +02:00
|
|
|
# Move .pc file to _libdir
|
2010-08-13 23:57:54 +02:00
|
|
|
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
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%post -n libz1 -p /sbin/ldconfig
|
2008-01-12 03:49:07 +01:00
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%postun -n libz1 -p /sbin/ldconfig
|
2006-12-19 00:18:46 +01:00
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%files -n libz1
|
2006-12-19 00:18:46 +01:00
|
|
|
%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
|
2011-08-29 09:12:17 +02:00
|
|
|
%{_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
|