File zlib-ng.spec of Package zlib-ng
#
# spec file for package zlib-ng
#
# Copyright (c) 2022 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define libz1_ver 1.2.11
Name: zlib-ng
Version: 2.0.6
Release: 0
Summary: Library implementing the DEFLATE compression algorithm
License: Zlib
URL: http://www.zlib.net/
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
%description
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.
%package -n libz1-ng
Summary: Library implementing the DEFLATE compression algorithm
Provides: libz1 = %{libz1_ver}
Obsoletes: libz1 < %{libz1_ver}
%description -n libz1-ng
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.
%package devel
Summary: Development files for zlib, a data compression library
Requires: glibc-devel
Requires: libz1-ng = %{version}
%description devel
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.
%package devel-static
Summary: Static library for zlib
Requires: %{name}-devel = %{version}
Provides: %{name}-devel:%{_libdir}/libz.a
%description devel-static
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.
%prep
%autosetup
%build
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--zlib-compat \
--without-optimizations \
--with-dfltcc-deflate \
--with-dfltcc-inflate
%make_build
%install
%make_install
%check
cd test
make all
%post -n libz1-ng -p /sbin/ldconfig
%postun -n libz1-ng -p /sbin/ldconfig
%files -n libz1-ng
%{_libdir}/libz.so.%{libz1_ver}.zlib-ng
%{_libdir}/libz.so.1
%files devel
%license LICENSE.md
%doc README.md
%{_includedir}/zlib.h
%{_includedir}/zconf.h
%{_libdir}/libz.so
%{_libdir}/pkgconfig/zlib.pc
%files devel-static
%{_libdir}/libz.a
%changelog