2023-08-28 13:42:03 +00:00
|
|
|
%bcond_without compat
|
|
|
|
%bcond_without sanitizers
|
|
|
|
|
2023-07-11 15:03:49 +00:00
|
|
|
# Be explicit about the soname in order to avoid unintentional changes.
|
2023-08-28 13:42:03 +00:00
|
|
|
# Before modifying any of the sonames, this must be announced to the Fedora
|
|
|
|
# community as it may break many other packages.
|
|
|
|
# A change proposal is needed:
|
|
|
|
# https://docs.fedoraproject.org/en-US/program_management/changes_policy/
|
2023-07-11 15:03:49 +00:00
|
|
|
%global soname libz-ng.so.2
|
2023-08-28 13:42:03 +00:00
|
|
|
%global compat_soname libz.so.1
|
|
|
|
|
|
|
|
# Compatible with the following zlib version.
|
2024-10-30 12:00:43 +00:00
|
|
|
%global zlib_ver 1.3.1
|
2023-08-28 13:42:03 +00:00
|
|
|
# Obsoletes zlib versions less than.
|
|
|
|
%global zlib_obsoletes 1.3
|
|
|
|
|
|
|
|
# ABI files for ix86 and s390x are not available upstream.
|
|
|
|
%global supported_abi_test aarch64 ppc64le x86_64
|
2023-07-11 15:03:49 +00:00
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
Name: zlib-ng
|
2024-10-30 12:00:43 +00:00
|
|
|
Version: 2.2.2
|
|
|
|
Release: 1%{?dist}
|
2020-07-07 00:29:40 +00:00
|
|
|
Summary: Zlib replacement with optimizations
|
2024-01-16 21:02:13 +00:00
|
|
|
License: Zlib
|
2020-07-02 02:03:53 +00:00
|
|
|
Url: https://github.com/zlib-ng/zlib-ng
|
2022-04-14 12:55:22 +00:00
|
|
|
Source0: https://github.com/zlib-ng/zlib-ng/archive/%{version}/%{name}-%{version}.tar.gz
|
2020-07-02 02:03:53 +00:00
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
Patch: far.diff
|
|
|
|
|
2023-07-11 15:03:49 +00:00
|
|
|
BuildRequires: cmake >= 3.1
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: cmake(GTest)
|
2023-08-28 13:42:03 +00:00
|
|
|
BuildRequires: libabigail
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
zlib-ng is a zlib replacement that provides optimizations for "next generation"
|
|
|
|
systems.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2020-07-07 00:29:40 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%description devel
|
2023-08-28 13:42:03 +00:00
|
|
|
The %{name}-devel package contains libraries and header files for developing
|
|
|
|
application that use %{name}.
|
|
|
|
|
|
|
|
%if %{with compat}
|
|
|
|
|
|
|
|
%package compat
|
|
|
|
Summary: Zlib implementation provided by %{name}
|
|
|
|
Provides: zlib = %{zlib_ver}
|
|
|
|
Provides: zlib%{?_isa} = %{zlib_ver}
|
|
|
|
Conflicts: zlib%{?_isa}
|
|
|
|
Obsoletes: zlib < %{zlib_obsoletes}
|
|
|
|
|
|
|
|
%description compat
|
|
|
|
zlib-ng is a zlib replacement that provides optimizations for "next generation"
|
|
|
|
systems.
|
|
|
|
The %{name}-compat package contains the library that is API and binary
|
|
|
|
compatible with zlib.
|
|
|
|
|
|
|
|
%package compat-devel
|
|
|
|
Summary: Development files for %{name}-compat
|
|
|
|
Requires: %{name}-compat%{?_isa} = %{version}-%{release}
|
|
|
|
Provides: zlib-devel = %{zlib_ver}
|
|
|
|
Provides: zlib-devel%{?_isa} = %{zlib_ver}
|
|
|
|
Conflicts: zlib-devel%{?_isa}
|
|
|
|
Obsoletes: zlib-devel < %{zlib_obsoletes}
|
|
|
|
|
|
|
|
%description compat-devel
|
|
|
|
The %{name}-compat-devel package contains libraries and header files for
|
|
|
|
developing application that use zlib.
|
|
|
|
|
2024-01-09 19:58:13 +00:00
|
|
|
%package compat-static
|
|
|
|
Summary: Static libraries for %{name}-compat
|
|
|
|
Requires: %{name}-compat-devel%{?_isa} = %{version}-%{release}
|
|
|
|
Provides: zlib-static = %{zlib_ver}
|
|
|
|
Provides: zlib-static%{?_isa} = %{zlib_ver}
|
|
|
|
Conflicts: zlib-static%{?_isa}
|
|
|
|
Obsoletes: zlib-static < %{zlib_obsoletes}
|
|
|
|
|
|
|
|
%description compat-static
|
|
|
|
The %{name}-compat-static package contains static libraries needed for
|
|
|
|
developing applications that use zlib.
|
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
%endif
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%prep
|
2022-04-14 12:55:22 +00:00
|
|
|
%autosetup -p1 -n %{name}-%{version}
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%build
|
2023-08-28 13:42:03 +00:00
|
|
|
cat <<_EOF_
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Build the default zlib-ng library
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
_EOF_
|
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
# zlib-ng uses a different macro for library directory.
|
2024-01-11 13:28:37 +00:00
|
|
|
%global cmake_param %{?with_sanitizers:-DWITH_SANITIZER=ON}
|
2023-08-28 13:42:03 +00:00
|
|
|
|
|
|
|
# Setting __cmake_builddir is not necessary in this step, but do it anyway for symmetry.
|
|
|
|
%global __cmake_builddir %{_vpath_builddir}
|
|
|
|
%cmake %{cmake_param}
|
2020-07-10 00:40:18 +00:00
|
|
|
%cmake_build
|
2020-07-02 02:03:53 +00:00
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
%if %{with compat}
|
|
|
|
cat <<_EOF_
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Build the compat mode library
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
_EOF_
|
|
|
|
|
|
|
|
%global __cmake_builddir %{_vpath_builddir}-compat
|
2024-01-09 19:58:13 +00:00
|
|
|
# defining BUILD_SHARED_LIBS disables the static library
|
|
|
|
%undefine _cmake_shared_libs
|
2023-08-28 13:42:03 +00:00
|
|
|
# Disable new strategies in order to keep compatibility with zlib.
|
|
|
|
%cmake %{cmake_param} -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF
|
|
|
|
%cmake_build
|
|
|
|
%endif
|
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
%check
|
2023-08-28 13:42:03 +00:00
|
|
|
cat <<_EOF_
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Run the zlib-ng tests
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
_EOF_
|
|
|
|
|
|
|
|
%global __cmake_builddir %{_vpath_builddir}
|
|
|
|
%ctest
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
# Workaround Copr, that sets _target_cpu to ppc64le.
|
|
|
|
%global target_cpu powerpc64le
|
|
|
|
%else
|
|
|
|
%global target_cpu %{_target_cpu}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
%global vendor pc
|
|
|
|
%else
|
|
|
|
%global vendor unknown
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch %{supported_abi_test}
|
|
|
|
CHOST=%{target_cpu}-%{vendor}-linux-gnu sh test/abicheck.sh
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with compat}
|
|
|
|
cat <<_EOF_
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Run the compat mode tests
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
_EOF_
|
|
|
|
|
|
|
|
%global __cmake_builddir %{_vpath_builddir}-compat
|
2020-07-10 00:40:18 +00:00
|
|
|
%ctest
|
2023-08-28 13:42:03 +00:00
|
|
|
%ifarch %{supported_abi_test}
|
|
|
|
CHOST=%{target_cpu}-%{vendor}-linux-gnu sh test/abicheck.sh --zlib-compat
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%install
|
2023-08-28 13:42:03 +00:00
|
|
|
%global __cmake_builddir %{_vpath_builddir}
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
%if %{with compat}
|
|
|
|
%global __cmake_builddir %{_vpath_builddir}-compat
|
2020-07-10 00:40:18 +00:00
|
|
|
%cmake_install
|
2023-08-28 13:42:03 +00:00
|
|
|
%endif
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.md
|
|
|
|
%doc README.md
|
2023-07-11 15:03:49 +00:00
|
|
|
%{_libdir}/libz-ng.so.%{version}
|
|
|
|
%{_libdir}/%{soname}
|
2020-07-02 02:03:53 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/zconf-ng.h
|
|
|
|
%{_includedir}/zlib-ng.h
|
2023-07-11 15:03:49 +00:00
|
|
|
%{_includedir}/zlib_name_mangling-ng.h
|
2020-07-07 00:29:40 +00:00
|
|
|
%{_libdir}/libz-ng.so
|
2020-09-14 01:52:56 +00:00
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2024-01-11 13:28:21 +00:00
|
|
|
%{_libdir}/cmake/zlib-ng/*
|
2020-07-02 02:03:53 +00:00
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
%if %{with compat}
|
|
|
|
|
|
|
|
%files compat
|
|
|
|
%{_libdir}/%{compat_soname}
|
|
|
|
%{_libdir}/libz.so.%{zlib_ver}.zlib-ng
|
|
|
|
|
|
|
|
%files compat-devel
|
|
|
|
%{_includedir}/zconf.h
|
|
|
|
%{_includedir}/zlib.h
|
|
|
|
%{_includedir}/zlib_name_mangling.h
|
|
|
|
%{_libdir}/libz.so
|
|
|
|
%{_libdir}/pkgconfig/zlib.pc
|
2024-01-11 13:28:21 +00:00
|
|
|
%{_libdir}/cmake/ZLIB/*
|
2023-08-28 13:42:03 +00:00
|
|
|
|
2024-01-09 19:58:13 +00:00
|
|
|
%files compat-static
|
|
|
|
%{_libdir}/libz.a
|
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
%changelog
|
2024-10-30 12:00:43 +00:00
|
|
|
* Wed Oct 30 2024 Lukas Javorsky <ljavorsk@redhat.com> - 2.2.2-1
|
|
|
|
- Rebase to new major version 2.2.2
|
|
|
|
|
2024-10-29 16:21:31 +00:00
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.1.6-4
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
2024-06-24 16:31:40 +00:00
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.1.6-3
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
2024-01-27 11:13:10 +00:00
|
|
|
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.6-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2024-01-11 13:28:21 +00:00
|
|
|
* Thu Jan 11 2024 Lukas Javorsky <ljavorsk@redhat.com> - 2.1.6-1
|
|
|
|
- Rebase to version 2.1.6
|
|
|
|
|
2024-01-09 19:58:13 +00:00
|
|
|
* Tue Jan 09 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 2.1.5-2
|
|
|
|
- Add zlib-ng-compat-static to replace zlib-static
|
|
|
|
|
2023-12-20 20:54:16 +00:00
|
|
|
* Wed Dec 20 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.5-1
|
|
|
|
- Update to zlib-ng 2.1.5
|
|
|
|
|
2023-08-28 13:42:03 +00:00
|
|
|
* Wed Oct 18 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.3-7
|
|
|
|
- Improve the patch that defines the FAR macro
|
|
|
|
|
|
|
|
* Wed Sep 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.3-6
|
|
|
|
- Add a patch that defines the FAR macro
|
|
|
|
|
|
|
|
* Wed Sep 20 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.3-5
|
|
|
|
- Fix WITH_SANITIZER
|
|
|
|
|
|
|
|
* Tue Sep 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.3-4
|
|
|
|
- Disable WITH_NEW_STRATEGIES in compat mode
|
|
|
|
|
|
|
|
* Thu Aug 24 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 2.1.3-3
|
|
|
|
- Enable zlib compat build
|
|
|
|
|
2023-07-22 19:45:15 +00:00
|
|
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
2023-07-11 15:03:49 +00:00
|
|
|
* Tue Jul 11 2023 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 2.1.3-1
|
|
|
|
- Update to 2.1.3
|
|
|
|
|
2023-01-21 08:18:49 +00:00
|
|
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
2022-07-23 13:58:12 +00:00
|
|
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-04-14 12:55:22 +00:00
|
|
|
* Thu Apr 14 2022 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 2.0.6-1
|
|
|
|
- New upstream release 2.0.6
|
|
|
|
|
2022-01-22 05:54:16 +00:00
|
|
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-2.20210625gitc69f78bc5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2021-08-07 23:45:41 +00:00
|
|
|
* Sat Aug 07 2021 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 2.0.2-5.20210625gitc69f78bc5e
|
|
|
|
- Update to v2.0.5.
|
|
|
|
|
2021-07-23 22:20:41 +00:00
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2.20210323git5fe25907e
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-04-18 16:37:26 +00:00
|
|
|
* Sun Apr 18 2021 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 2.0.2-1.20210323gite5fe25907e
|
|
|
|
- Update to v2.0.2.
|
|
|
|
- Remove the manpage that got removed from upstream.
|
|
|
|
|
2021-01-28 00:44:27 +00:00
|
|
|
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.9-0.4.20200912gite58738845
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-09-14 01:52:56 +00:00
|
|
|
* Sun Sep 13 2020 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 1.9.9-0.3.20200912gite58738845
|
|
|
|
- Update to a newer commit.
|
|
|
|
|
2020-07-29 15:25:49 +00:00
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.9-0.3.20200609gitfe69810c2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-10 00:40:18 +00:00
|
|
|
* Thu Jul 09 2020 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 1.9.9-0.2.20200609gitfe69810c2
|
|
|
|
- Replace cmake commands with new cmake macros
|
|
|
|
|
2020-07-07 00:29:40 +00:00
|
|
|
* Mon Jul 06 2020 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 1.9.9-0.1.20200609gitfe69810c2
|
|
|
|
- Improve the archive name.
|
|
|
|
- Starte release at 0.1 as required for prerelease.
|
|
|
|
- Make the devel package require an arch-dependent runtime subpackage.
|
|
|
|
- Remove %%ldconfig_scriptlets.
|
|
|
|
- Glob the man page extension.
|
|
|
|
- Move unversioned shared library to the devel subpackage
|
|
|
|
|
2020-07-02 02:03:53 +00:00
|
|
|
* Wed Jul 01 2020 Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> - 1.9.9-0.20200609gitfe69810c2
|
|
|
|
- Initial commit
|