Skip to content

Instantly share code, notes, and snippets.

@carlwgeorge
Created August 28, 2024 21:15
Show Gist options
  • Save carlwgeorge/dcd38dfca011c762ef64f11b5087da8c to your computer and use it in GitHub Desktop.
Save carlwgeorge/dcd38dfca011c762ef64f11b5087da8c to your computer and use it in GitHub Desktop.
--- zlib-ng.spec 2024-08-28 16:10:30.713794292 -0500
+++ zlib-ng-epel.spec 2024-08-28 16:14:33.850601166 -0500
@@ -1,4 +1,3 @@
-%bcond_without compat
%bcond_without sanitizers
# Be explicit about the soname in order to avoid unintentional changes.
@@ -7,23 +6,17 @@
# A change proposal is needed:
# https://docs.fedoraproject.org/en-US/program_management/changes_policy/
%global soname libz-ng.so.2
-%global compat_soname libz.so.1
-
-# Compatible with the following zlib version.
-%global zlib_ver 1.3.0
-# 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
-Name: zlib-ng
+Name: zlib-ng-epel
Version: 2.1.6
-Release: 3%{?dist}
-Summary: Zlib replacement with optimizations
+Release: 3.1%{?dist}
+Summary: Provide missing zlib-ng subpackages
License: Zlib
Url: https://github.com/zlib-ng/zlib-ng
-Source0: https://github.com/zlib-ng/zlib-ng/archive/%{version}/%{name}-%{version}.tar.gz
+Source0: https://github.com/zlib-ng/zlib-ng/archive/%{version}/zlib-ng-%{version}.tar.gz
Patch: far.diff
@@ -33,60 +26,26 @@
BuildRequires: libabigail
%description
-zlib-ng is a zlib replacement that provides optimizations for "next generation"
-systems.
+EPEL-only package to provide subpackages that are built but not shipped from
+the CentOS/RHEL zlib-ng build.
-%package devel
-Summary: Development files for %{name}
-Requires: %{name}%{?_isa} = %{version}-%{release}
-
-%description devel
-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}
+%package -n zlib-ng
+Summary: Zlib replacement with optimizations
-%description compat
+%description -n zlib-ng
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.
-
-%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.
-
-%endif
+%package -n zlib-ng-devel
+Summary: Development files for zlib-ng
+Requires: zlib-ng%{?_isa} = %{version}-%{release}
+
+%description -n zlib-ng-devel
+The zlib-ng-devel package contains libraries and header files for developing
+application that use zlib-ng.
%prep
-%autosetup -p1 -n %{name}-%{version}
+%autosetup -p1 -n zlib-ng-%{version}
%build
cat <<_EOF_
@@ -105,22 +64,6 @@
%cmake %{cmake_param}
%cmake_build
-%if %{with compat}
-cat <<_EOF_
-###########################################################################
-#
-# Build the compat mode library
-#
-###########################################################################
-_EOF_
-
-%global __cmake_builddir %{_vpath_builddir}-compat
-# defining BUILD_SHARED_LIBS disables the static library
-%undefine _cmake_shared_libs
-# Disable new strategies in order to keep compatibility with zlib.
-%cmake %{cmake_param} -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF
-%cmake_build
-%endif
%check
cat <<_EOF_
@@ -151,68 +94,32 @@
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
-%ctest
-%ifarch %{supported_abi_test}
-CHOST=%{target_cpu}-%{vendor}-linux-gnu sh test/abicheck.sh --zlib-compat
-%endif
-%endif
-
%install
%global __cmake_builddir %{_vpath_builddir}
%cmake_install
-%if %{with compat}
-%global __cmake_builddir %{_vpath_builddir}-compat
-%cmake_install
-%endif
-%files
+%files -n zlib-ng
%license LICENSE.md
%doc README.md
%{_libdir}/libz-ng.so.%{version}
%{_libdir}/%{soname}
-%files devel
+%files -n zlib-ng-devel
%{_includedir}/zconf-ng.h
%{_includedir}/zlib-ng.h
%{_includedir}/zlib_name_mangling-ng.h
%{_libdir}/libz-ng.so
-%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/pkgconfig/zlib-ng.pc
%{_libdir}/cmake/zlib-ng/*
-%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
-%{_libdir}/cmake/ZLIB/*
-
-%files compat-static
-%{_libdir}/libz.a
-
-
-%endif
-
%changelog
+* Wed Aug 28 2024 Carl George <carlwgeorge@gmail.com> - 2.1.6-3.1
+- New zlib-ng-epel package based on zlib-ng
+- Related: RHEL-56483
+
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.1.6-3
- Bump release for June 2024 mass rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment