From: Michael Tremer Date: Sat, 15 Feb 2025 13:39:45 +0000 (+0000) Subject: zlib-ng: Replace zlib with zlib-ng X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df63ef67f79c23574c39662d63f9c4fc5b1b84ae;p=ipfire-3.x.git zlib-ng: Replace zlib with zlib-ng Signed-off-by: Michael Tremer --- diff --git a/zlib-ng/zlib-ng.nm b/zlib-ng/zlib-ng.nm new file mode 100644 index 000000000..c487a3c1b --- /dev/null +++ b/zlib-ng/zlib-ng.nm @@ -0,0 +1,112 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +name = zlib-ng +version = 2.2.4 +release = 1 + +groups = System/Libraries +url = https://github.com/zlib-ng/zlib-ng +license = zlib +summary = zlib replacement with optimizations for "next generation" systems + +description + zlib-ng is a replacement for zlib which incorporates improvements + from various sources. +end + +source_dl = %{github_url} + +# This package is compatible with zlib in version 1.3.1 +zlib_version = 1.3.1 + +build + requires + cmake + end + + build + mkdir -pv build build-compat + + # Build the regular version + pushd build + %{cmake} .. \ + -DWITH_GTEST=OFF + %{make_build} + popd + + # Build the drop-in replacement + pushd build-compat + %{cmake} .. \ + -DWITH_GTEST=OFF \ + -DZLIB_COMPAT=ON \ + -DWITH_NEW_STRATEGIES=OFF + %{make_build} + popd + end + + test + pushd build + make test + popd + + pushd build-compat + make test + popd + end + + install + pushd build + %{make_install} + popd + + pushd build-compat + %{make_install} + popd + end +end + +packages + package %{name} + + package %{name}-compat + summary = Compatibility library of zlib-ng + + provides = zlib = %{zlib_version} + obsoletes = zlib <= %{zlib_version} + conflicts = zlib + + files + %{libdir}/libz.so.* + end + end + + package %{name}-devel + template DEVEL + + files += %{libdir}/cmake/zlib-ng + end + + package %{name}-compat-devel + summary = Development headers to the legacy version of zlib + + requires = %{name}-compat = %{thisver} + provides = zlib-devel = %{zlib_version} + obsoletes = zlib-devel <= %{zlib_version} + conflicts = zlib-devel + + files + %{includedir} + !%{includedir}/*-ng* + %{libdir}/cmake/ZLIB + %{libdir}/libz.so + %{libdir}/pkgconfig/zlib.pc + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/zlib/zlib.nm b/zlib/zlib.nm deleted file mode 100644 index a7a7b6e80..000000000 --- a/zlib/zlib.nm +++ /dev/null @@ -1,50 +0,0 @@ -############################################################################### -# IPFire.org - An Open Source Firewall Solution # -# Copyright (C) - IPFire Development Team # -############################################################################### - -name = zlib -version = 1.3.1 -release = 1 - -groups = System/Libraries -url = https://zlib.net/ -license = zlib -summary = The zlib compression and decompression library. - -description - Zlib is a general-purpose, patent-free, lossless data compression - library which is used by many different programs. -end - -source_dl = https://zlib.net/ - -# Enable PIC build. -CFLAGS += -fPIC -DPIC - -build - configure_options = \ - --prefix=%{prefix} \ - --libdir=%{libdir} - - test - make check - end - - install_cmds - mkdir -pv %{BUILDROOT}%{includedir} %{BUILDROOT}%{libdir} - cp -pfv zconf.h zlib.h %{BUILDROOT}%{includedir} - end -end - -packages - package %{name} - - package %{name}-devel - template DEVEL - end - - package %{name}-debuginfo - template DEBUGINFO - end -end