From 39d2a03b5f6c6fe76f4e368c24d6b2f049e5283d90a53534edbcd4d8002bda5f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 27 Aug 2021 08:06:00 +0000 Subject: [PATCH] Accepting request 914533 from home:michals - Add ZSTD support on Tumbleweed only. Add a way to detect ZSTD. OBS-URL: https://build.opensuse.org/request/show/914533 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=196 --- kmod.changes | 5 +++++ kmod.spec | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/kmod.changes b/kmod.changes index 1ab4632..73a1019 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 27 07:56:40 UTC 2021 - Michal Suchanek + +- Add ZSTD support on Tumbleweed only. Add a way to detect ZSTD. + ------------------------------------------------------------------- Wed Aug 18 10:55:57 UTC 2021 - Michal Suchanek diff --git a/kmod.spec b/kmod.spec index ed243d1..49aadcf 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,6 +16,10 @@ # +%if 0%{?suse_version} > 1500 +%define use_zstd 1 +%endif + Name: kmod %define lname libkmod2 Version: 29 @@ -47,7 +51,10 @@ BuildRequires: libxslt-tools BuildRequires: pkgconfig >= 0.21 BuildRequires: xz BuildRequires: pkgconfig(liblzma) >= 4.99 +%if 0%{?use_zstd} BuildRequires: pkgconfig(libzstd) +Provides: kmod-zstd +%endif BuildRequires: pkgconfig(zlib) Requires(post): coreutils Obsoletes: kmod-compat < %version-%release @@ -112,7 +119,9 @@ export LDFLAGS="-Wl,-z,relro,-z,now" --with-xz \ --with-zlib \ --with-openssl \ +%if 0%{?use_zstd} --with-zstd \ +%endif --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir"