[packages/xz] add static_libs bcond

atler atler at pld-linux.org
Fri Jan 26 18:09:10 CET 2024


commit 56c16b6d2f0f93972abcdcee33556df4d3d16e8c
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Jan 26 17:39:04 2024 +0100

    add static_libs bcond

 xz.spec | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/xz.spec b/xz.spec
index 59e5553..a36b5df 100644
--- a/xz.spec
+++ b/xz.spec
@@ -1,7 +1,8 @@
 #
 # Conditional build:
-%bcond_without	tests	# don't perform make check
-%bcond_without	asm	# ix86 asm optimizations
+%bcond_without	tests		# don't perform make check
+%bcond_without	asm		# ix86 asm optimizations
+%bcond_without	static_libs	# static library
 
 %ifnarch %{ix86}
 # Speed-optimized CRC64 using slicing-by-four algorithm. This uses only i386
@@ -29,7 +30,7 @@ Patch1:		%{name}-memlimit.patch
 URL:		https://tukaani.org/xz/
 %{?with_asm:BuildRequires:	gcc >= 5:3.4}
 BuildRequires:	rpm >= 4.4.9-56
-BuildRequires:	rpmbuild(macros) >= 1.402
+BuildRequires:	rpmbuild(macros) >= 1.527
 Requires:	%{name}-libs = %{epoch}:%{version}-%{release}
 Suggests:	mktemp
 Provides:	lzma = %{epoch}:%{version}-%{release}
@@ -121,7 +122,8 @@ Biblioteka statyczna LZMA.
 
 %build
 %configure \
-	%{!?with_asm:--disable-assembler}
+	%{!?with_asm:--disable-assembler} \
+	%{__enable_disable static_libs static}
 %{__make}
 
 %{?with_tests:%{__make} check}
@@ -203,6 +205,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/liblzma.pc
 %{_examplesdir}/%{name}-%{version}
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/liblzma.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xz.git/commitdiff/56c16b6d2f0f93972abcdcee33556df4d3d16e8c



More information about the pld-cvs-commit mailing list