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
|
|
|
#
|
2015-06-24 11:03:38 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX 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-22 07:11:31 +02:00
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%bcond_with profiling
|
2007-02-02 01:33:10 +01:00
|
|
|
Name: zlib
|
2013-05-13 20:37:49 +02:00
|
|
|
Version: 1.2.8
|
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/
|
2013-05-13 20:37:49 +02:00
|
|
|
Source0: http://zlib.net/zlib-%{version}.tar.gz
|
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
|
2013-07-29 14:38:12 +02:00
|
|
|
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
|
|
|
Patch1: zlib-format.patch
|
2015-06-24 11:03:38 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
2010-08-13 23:57:54 +02:00
|
|
|
BuildRequires: pkgconfig
|
2012-05-07 14:48:26 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
2015-06-24 11:03:38 +02:00
|
|
|
Group: System/Libraries
|
2012-10-15 09:45:19 +02:00
|
|
|
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}
|
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.
|
|
|
|
|
2015-06-30 13:31:09 +02:00
|
|
|
%package devel-static
|
|
|
|
Summary: Static lib for libz1 library
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Provides: %{name}-devel:%{_libdir}/libz.a
|
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
Static library for libz1 package, that is complementing the devel package
|
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
%package -n libminizip1
|
|
|
|
Summary: Library for manipulation with .zip archives
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libminizip1
|
|
|
|
Minizip is a library for manipulation with files from .zip archives.
|
|
|
|
|
|
|
|
%package -n minizip-devel
|
|
|
|
Summary: Development files for the minizip library
|
2009-03-24 18:33:44 +01:00
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Requires: %{name}-devel = %{version}
|
2015-06-24 11:03:38 +02:00
|
|
|
Requires: libminizip1 = %{version}
|
|
|
|
Requires: pkgconfig
|
2009-03-24 18:33:44 +01:00
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
%description -n minizip-devel
|
|
|
|
This package contains the libraries and header files needed for
|
|
|
|
developing applications which use minizip.
|
2009-03-24 18:33:44 +01:00
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2012-10-15 09:45:19 +02:00
|
|
|
%patch0 -p1
|
2013-07-29 14:38:12 +02:00
|
|
|
%patch1 -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"
|
2013-05-13 20:37:49 +02:00
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
# For sure not autotools build
|
|
|
|
CC="cc" ./configure \
|
|
|
|
--shared \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=/%{_lib}
|
|
|
|
|
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
|
|
|
make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
|
2015-06-24 11:03:38 +02:00
|
|
|
time make check %{?_smp_mflags}
|
|
|
|
make %{?_smp_mflags} 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
|
|
|
make %{?_smp_mflags}
|
2010-12-29 00:40:18 +01:00
|
|
|
%endif
|
2008-01-12 03:49:07 +01:00
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
# And build minizip
|
|
|
|
cd contrib/minizip
|
|
|
|
autoreconf -fvi
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--disable-silent-rules
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
2008-01-12 03:49:07 +01:00
|
|
|
%check
|
2014-09-25 10:07:29 +02:00
|
|
|
time make check %{?_smp_mflags}
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%install
|
2011-12-27 18:39:53 +01:00
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
2014-09-25 10:07:29 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
2015-06-24 11:03:38 +02:00
|
|
|
# Fix shared library placement/symlinks
|
2012-05-07 14:48:26 +02:00
|
|
|
ln -s -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
|
|
|
|
rm -v %{buildroot}/%{_lib}/libz.so
|
2015-06-30 13:31:09 +02:00
|
|
|
# Static lib
|
|
|
|
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}
|
2014-09-25 10:07:29 +02:00
|
|
|
# examples
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
|
|
cp -r examples/ %{buildroot}%{_docdir}/%{name}/
|
2006-12-19 00:18:46 +01:00
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
# Install minizip
|
|
|
|
cd contrib/minizip
|
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
|
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
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
%post -n libminizip1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libminizip1 -p /sbin/ldconfig
|
|
|
|
|
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
|
2014-09-25 10:07:29 +02:00
|
|
|
%dir %{_docdir}/%{name}/
|
|
|
|
%dir %{_docdir}/%{name}/examples
|
|
|
|
%{_docdir}/%{name}/examples/*
|
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
|
|
|
|
2015-06-24 11:03:38 +02:00
|
|
|
%files -n libminizip1
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt
|
|
|
|
%{_libdir}/libminizip.so.*
|
|
|
|
|
|
|
|
%files -n minizip-devel
|
2009-03-24 18:33:44 +01:00
|
|
|
%defattr(-,root,root)
|
2015-06-24 11:03:38 +02:00
|
|
|
%dir %{_includedir}/minizip
|
|
|
|
%{_includedir}/minizip/*.h
|
|
|
|
%{_libdir}/libminizip.so
|
|
|
|
%{_libdir}/pkgconfig/minizip.pc
|
2006-12-19 00:18:46 +01:00
|
|
|
|
2015-06-30 13:31:09 +02:00
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libz.a
|
|
|
|
|
2007-05-06 17:11:46 +02:00
|
|
|
%changelog
|