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
|
|
|
#
|
2017-06-01 16:22:52 +02:00
|
|
|
# Copyright (c) 2017 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
|
|
|
|
2007-02-02 01:33:10 +01:00
|
|
|
Name: zlib
|
2017-01-16 11:25:54 +01:00
|
|
|
Version: 1.2.11
|
2011-12-12 17:00:09 +01:00
|
|
|
Release: 0
|
2015-09-25 18:04:36 +02:00
|
|
|
Summary: Library implementing the DEFLATE compression algorithm
|
2011-12-12 17:00:09 +01:00
|
|
|
License: Zlib
|
2015-09-25 18:04:36 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
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
|
2017-06-01 16:22:52 +02:00
|
|
|
Source1: http://zlib.net/zlib-%{version}.tar.gz.asc
|
|
|
|
Source2: %{name}.keyring
|
|
|
|
Source4: LICENSE
|
|
|
|
Source5: baselibs.conf
|
|
|
|
Source6: zlib-rpmlintrc
|
2017-05-11 09:48:12 +02:00
|
|
|
#PATCH-FIX-SUSE: fate#314093, sent upstream by IBM
|
|
|
|
Patch0: zlib-1.2.11-optimized-s390.patch
|
2017-01-02 20:04:48 +01:00
|
|
|
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
|
|
|
Patch1: zlib-format.patch
|
2018-05-15 12:57:38 +02:00
|
|
|
#PATCH-FIX-UPSTREAM do not store negative values in uInt
|
|
|
|
Patch2: 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch
|
2018-06-20 17:04:42 +02:00
|
|
|
#PATCH-FIX-UPSTREAM https://github.com/madler/zlib/pull/335
|
|
|
|
Patch3: zlib-power8-fate325307.patch
|
2019-06-06 11:44:46 +02:00
|
|
|
#PATCH-FIX-UPSTREAM https://github.com/madler/zlib/pull/410
|
2019-06-06 11:47:36 +02:00
|
|
|
Patch4: 410.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
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%description
|
2015-09-25 18:04:36 +02:00
|
|
|
zlib is a general-purpose lossless data-compression library,
|
|
|
|
implementing an API for the DEFLATE algorithm, the latter of
|
|
|
|
which is being used by, for example, gzip and the ZIP archive
|
|
|
|
format.
|
2012-10-15 09:45:19 +02:00
|
|
|
|
|
|
|
%package -n libz1
|
2015-09-25 18:04:36 +02:00
|
|
|
Summary: Library implementing the DEFLATE compression algorithm
|
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
|
2015-09-25 18:04:36 +02:00
|
|
|
zlib is a general-purpose lossless data-compression library,
|
|
|
|
implementing an API for the DEFLATE algorithm, the latter of
|
|
|
|
which is being used by, for example, gzip and the ZIP archive
|
|
|
|
format.
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%package devel
|
2015-09-25 18:04:36 +02:00
|
|
|
Summary: Development files for zlib, a data compression library
|
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
|
2015-09-25 18:04:36 +02:00
|
|
|
zlib is a general-purpose lossless data-compression library,
|
|
|
|
implementing an API for the DEFLATE algorithm, the latter of
|
|
|
|
which is being used by, for example, gzip and the ZIP archive
|
|
|
|
format.
|
|
|
|
|
|
|
|
This subpackage holds the development headers for the library.
|
|
|
|
|
|
|
|
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
|
|
|
|
2015-06-30 13:31:09 +02:00
|
|
|
%package devel-static
|
2015-09-25 18:04:36 +02:00
|
|
|
Summary: Static library for zlib
|
2015-06-30 13:31:09 +02:00
|
|
|
Group: Development/Languages/C and C++
|
2015-07-13 13:59:05 +02:00
|
|
|
Requires: %{name}-devel = %{version}
|
2015-06-30 13:31:09 +02:00
|
|
|
Provides: %{name}-devel:%{_libdir}/libz.a
|
|
|
|
|
|
|
|
%description devel-static
|
2015-09-25 18:04:36 +02:00
|
|
|
zlib is a general-purpose lossless data-compression library,
|
|
|
|
implementing an API for the DEFLATE algorithm, the latter of
|
|
|
|
which is being used by, for example, gzip and the ZIP archive
|
|
|
|
format.
|
|
|
|
|
|
|
|
This subpackage contains the static version of the library
|
|
|
|
used for development.
|
2015-06-30 13:31:09 +02:00
|
|
|
|
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
|
2017-05-11 09:48:12 +02:00
|
|
|
%patch0
|
2017-01-02 20:04:48 +01:00
|
|
|
%patch1
|
2018-05-15 12:57:38 +02:00
|
|
|
%patch2 -p1
|
2018-06-20 17:04:42 +02:00
|
|
|
%patch3 -p1
|
2019-06-06 11:47:36 +02:00
|
|
|
%patch4 -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"
|
2019-06-06 11:59:27 +02:00
|
|
|
%ifarch s390 s390x
|
|
|
|
export CFLAGS="%{optflags} -DDFLTCC"
|
|
|
|
%define addopts OBJA=dfltcc.o PIC_OBJA=dfltcc.lo
|
|
|
|
%else
|
2015-06-24 11:03:38 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
2019-06-06 11:59:27 +02:00
|
|
|
%define addopts %{nil}
|
|
|
|
%endif
|
2015-06-24 11:03:38 +02:00
|
|
|
# For sure not autotools build
|
|
|
|
CC="cc" ./configure \
|
|
|
|
--shared \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=/%{_lib}
|
|
|
|
|
2017-06-01 16:22:52 +02:00
|
|
|
%if %{do_profiling}
|
2019-06-06 11:59:27 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" %{addopts}
|
2017-06-01 16:22:52 +02:00
|
|
|
make check %{?_smp_mflags}
|
|
|
|
make clean
|
2019-06-06 11:59:27 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" %{addopts}
|
2010-12-29 00:40:18 +01:00
|
|
|
%else
|
2019-06-06 11:59:27 +02:00
|
|
|
make %{?_smp_mflags} %{addopts}
|
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
|
2019-06-06 11:59:27 +02:00
|
|
|
make %{?_smp_mflags} %{addopts}
|
2015-06-24 11:03:38 +02:00
|
|
|
|
2008-01-12 03:49:07 +01:00
|
|
|
%check
|
2017-06-01 16:22:52 +02:00
|
|
|
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}
|
2017-06-01 16:22:52 +02:00
|
|
|
%make_install
|
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
|
2017-06-01 16:22:52 +02:00
|
|
|
%make_install
|
2015-06-24 11:03:38 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
|
2012-10-15 09:45:19 +02:00
|
|
|
%post -n libz1 -p /sbin/ldconfig
|
|
|
|
%postun -n libz1 -p /sbin/ldconfig
|
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/*
|
2017-06-01 16:22:52 +02:00
|
|
|
%{_mandir}/man3/zlib.3%{ext_man}
|
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
|