From 0520d65823e20de711963b9fb122f4068fefbe0a Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 22 May 2020 10:54:30 +0300 Subject: [PATCH] Add static library subpackage Some zstd APIs are only available via the static package. Make it available so they can be used. These APIs are experimental, so they should be used with care, but Fedora should still make them available. See https://facebook.github.io/zstd/zstd_manual.html#Chapter14 for more details. --- zstd.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zstd.spec b/zstd.spec index 61e2ec1..f1e51fd 100644 --- a/zstd.spec +++ b/zstd.spec @@ -13,7 +13,7 @@ Name: zstd Version: 1.4.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -41,9 +41,15 @@ Zstandard compression shared library. Summary: Header files for Zstd library Requires: lib%{name}%{?_isa} = %{version}-%{release} +%package -n lib%{name}-static +Summary: Static variant of the Zstd library +Requires: lib%{name}-devel = %{version}-%{release} + %description -n lib%{name}-devel Header files for Zstd library. +%description -n lib%{name}-static +Static variant of the Zstd library. %prep %setup -q @@ -74,8 +80,6 @@ make -C contrib/pzstd test %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} -# Don't install the static lib -rm %{buildroot}%{_libdir}/libzstd.a %if %{with pzstd} install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 @@ -112,9 +116,15 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %{_libdir}/pkgconfig/libzstd.pc %{_libdir}/libzstd.so +%files -n lib%{name}-static +%{_libdir}/libzstd.a + %ldconfig_scriptlets -n lib%{name} %changelog +* Fri May 22 2020 Avi Kivity - 1.4.4-3 +- Added static library subpackage + * Fri Jan 31 2020 Fedora Release Engineering - 1.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild