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"