[packages/tinyalsa] add static_libs bcond

atler atler at pld-linux.org
Sun Nov 29 15:06:50 CET 2026


commit 7b4d144eec8f8423bc2efe2b732144ec6b627358
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Nov 29 15:05:48 2026 +0100

    add static_libs bcond

 tinyalsa.spec | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/tinyalsa.spec b/tinyalsa.spec
index fbf58eb..ee21c7f 100644
--- a/tinyalsa.spec
+++ b/tinyalsa.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	Small library to interface with ALSA in the Linux kernel
 Summary(pl.UTF-8):	Mała biblioteka do współpracy z podsystemem ALSA w jądrze Linuksa
 Name:		tinyalsa
@@ -73,6 +77,7 @@ Programy narzędziowe do biblioteki tinyalsa.
 
 %build
 %meson \
+	%{!?with_static_libs:--default-library=shared} \
 	-Ddocs=enabled \
 	-Dexamples=disabled \
 	-Dutils=enabled
@@ -114,9 +119,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/libtinyalsa-mixer.3*
 %{_mandir}/man3/libtinyalsa-pcm.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libtinyalsa.a
+%endif
 
 %files tools
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tinyalsa.git/commitdiff/7b4d144eec8f8423bc2efe2b732144ec6b627358



More information about the pld-cvs-commit mailing list