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
|
|
|
#
|
2023-01-19 12:29:57 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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.
|
|
|
|
|
2019-07-17 09:31:40 +02:00
|
|
|
# Please submit bugfixes or comments via https://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
|
2023-01-19 12:29:57 +01:00
|
|
|
Version: 1.2.13
|
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
|
2022-07-02 12:00:56 +02:00
|
|
|
URL: https://www.zlib.net/
|
|
|
|
Source0: https://zlib.net/zlib-%{version}.tar.gz
|
|
|
|
Source1: https://zlib.net/zlib-%{version}.tar.gz.asc
|
2017-06-01 16:22:52 +02:00
|
|
|
Source2: %{name}.keyring
|
|
|
|
Source4: LICENSE
|
|
|
|
Source5: baselibs.conf
|
|
|
|
Source6: zlib-rpmlintrc
|
2017-01-02 20:04:48 +01:00
|
|
|
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
|
|
|
Patch1: zlib-format.patch
|
2023-01-19 12:29:57 +01:00
|
|
|
#PATCH-FIX-SUSE do not store negative values in uInt
|
2018-05-15 12:57:38 +02:00
|
|
|
Patch2: 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch
|
2019-10-21 09:13:47 +02:00
|
|
|
#PATCH-FIX-SUSE do not check exact version match as the lib can be updated
|
|
|
|
# we should simply rely on soname versioning to protect us
|
2022-08-31 09:52:46 +02:00
|
|
|
Patch3: zlib-no-version-check.patch
|
2023-01-19 12:29:57 +01:00
|
|
|
#PATCH-FIX-SUSE https://github.com/madler/zlib/pull/229
|
|
|
|
Patch4: minizip-dont-install-crypt-header.patch
|
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/madler/zlib/commit/e554695638228b846d49657f31eeff0ca4680e8a
|
|
|
|
Patch5: zlib-1.2.13-fix-bug-deflateBound.patch
|
|
|
|
#PATCH-FIX-SUSE https://github.com/madler/zlib/pull/410
|
|
|
|
Patch6: zlib-1.2.13-IBM-Z-hw-accelerated-deflate-s390x.patch
|
|
|
|
# Patches taken from https://github.com/iii-i/zlib/releases/tag/crc32vx-v3
|
2022-08-31 09:52:46 +02:00
|
|
|
Patch7: zlib-1.2.5-minizip-fixuncrypt.patch
|
2023-01-19 12:29:57 +01:00
|
|
|
Patch8: zlib-1.2.13-optimized-s390.patch
|
2022-10-11 14:40:29 +02:00
|
|
|
# https://github.com/iii-i/zlib/commit/171d0ff3c9ed40da0ac14085ab16b766b1162069
|
2022-08-31 09:52:46 +02:00
|
|
|
Patch10: zlib-1.2.11-covscan-issues.patch
|
|
|
|
Patch11: zlib-1.2.11-covscan-issues-rhel9.patch
|
|
|
|
Patch14: zlib-1.2.12-s390-vectorize-crc32.patch
|
2022-10-11 14:40:29 +02:00
|
|
|
# The following patches are taken from https://github.com/mscastanho/zlib/commits/power-optimizations-1.2.12
|
|
|
|
Patch15: zlib-1.2.12-adler32-vector-optimizations-for-power.patch
|
|
|
|
Patch16: zlib-1.2.12-fix-invalid-memory-access-on-ppc-and-ppc64.patch
|
|
|
|
Patch17: zlib-1.2.12-add-optimized-slide_hash-for-power.patch
|
|
|
|
Patch18: zlib-1.2.12-add-vectorized-longest_match-for-power.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
|
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
|
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-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
|
|
|
|
|
|
|
|
%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
|
|
|
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
|
|
|
|
2020-09-16 19:25:26 +02:00
|
|
|
%package testsuite
|
|
|
|
Summary: Provide the test examples to reproduce test suite
|
|
|
|
Requires: libz1 = %{version}
|
|
|
|
|
|
|
|
%description testsuite
|
|
|
|
To run the testsuite, execute %{_libexecdir}/%{name}/testsuite
|
|
|
|
|
|
|
|
It should exit 0
|
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
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
|
2022-08-31 09:52:46 +02:00
|
|
|
%patch4 -p1
|
2019-10-21 09:13:47 +02:00
|
|
|
%patch5 -p1
|
2020-08-06 12:07:22 +02:00
|
|
|
%patch6 -p1
|
2022-08-31 09:52:46 +02:00
|
|
|
%patch7 -p1
|
|
|
|
%patch8
|
2022-03-11 18:51:58 +01:00
|
|
|
%patch10 -p1
|
2022-03-25 19:14:59 +01:00
|
|
|
%patch11 -p1
|
2022-08-31 09:52:46 +02:00
|
|
|
%patch14 -p1
|
2022-10-11 14:40:29 +02:00
|
|
|
%patch15 -p1
|
|
|
|
%patch16 -p1
|
|
|
|
%patch17 -p1
|
|
|
|
%patch18 -p1
|
2019-07-17 09:31:40 +02:00
|
|
|
cp %{SOURCE4} .
|
2011-08-29 09:12:26 +02:00
|
|
|
|
2006-12-19 00:18:46 +01:00
|
|
|
%build
|
2019-07-02 09:28:17 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2011-08-29 09:12:17 +02:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
2015-06-24 11:03:38 +02:00
|
|
|
# For sure not autotools build
|
2022-12-12 11:46:22 +01:00
|
|
|
CC="cc" CFLAGS="%{optflags}" ./configure \
|
2015-06-24 11:03:38 +02:00
|
|
|
--shared \
|
|
|
|
--prefix=%{_prefix} \
|
2020-11-27 11:49:41 +01:00
|
|
|
--libdir=%{_libdir} \
|
2020-04-23 10:19:24 +02:00
|
|
|
%ifarch s390x s390
|
2020-04-23 10:21:02 +02:00
|
|
|
--dfltcc \
|
2022-03-25 19:14:59 +01:00
|
|
|
--dfltcc-level-mask=0x7e \
|
2020-04-23 10:19:24 +02:00
|
|
|
%endif
|
2020-04-23 10:21:02 +02:00
|
|
|
%{nil}
|
2015-06-24 11:03:38 +02:00
|
|
|
|
2022-08-31 09:52:46 +02:00
|
|
|
# Profiling flags breaks tests, as of 1.2.12
|
|
|
|
# In particular, gzseek does not work as intended
|
|
|
|
#%if %{do_profiling}
|
2022-12-12 11:46:22 +01:00
|
|
|
# %make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
|
|
|
|
# %make_build check
|
|
|
|
# %make_build clean
|
|
|
|
# %make_build %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
2022-08-31 09:52:46 +02:00
|
|
|
#%else
|
2022-12-12 11:46:22 +01:00
|
|
|
%make_build
|
2022-08-31 09:52:46 +02: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
|
2022-12-12 11:46:22 +01:00
|
|
|
%make_build
|
2015-06-24 11:03:38 +02:00
|
|
|
|
2008-01-12 03:49:07 +01:00
|
|
|
%check
|
2022-12-12 11:46:22 +01:00
|
|
|
%make_build check
|
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
|
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
|
|
|
|
2020-09-16 19:25:26 +02:00
|
|
|
install -D examplesh %{buildroot}%{_libexecdir}/%{name}/testsuite
|
|
|
|
|
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
|
2019-07-17 09:31:40 +02:00
|
|
|
%license LICENSE
|
2020-11-27 11:49:41 +01:00
|
|
|
%{_libdir}/libz.so.1.2.*
|
|
|
|
%{_libdir}/libz.so.1
|
2006-12-19 00:18:46 +01:00
|
|
|
|
|
|
|
%files devel
|
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/*
|
2019-07-17 09:31:40 +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
|
|
|
|
%doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt
|
|
|
|
%{_libdir}/libminizip.so.*
|
|
|
|
|
|
|
|
%files -n minizip-devel
|
|
|
|
%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
|
|
|
|
%{_libdir}/libz.a
|
|
|
|
|
2020-09-16 19:25:26 +02:00
|
|
|
%files testsuite
|
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/testsuite
|
|
|
|
|
2007-05-06 17:11:46 +02:00
|
|
|
%changelog
|