[packages/libslirp] add static_libs bcond

atler atler at pld-linux.org
Sat May 11 22:23:21 CEST 2024


commit 3f88561a66a47061a149ec436a4785f8826a71a5
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat May 11 22:16:57 2024 +0200

    add static_libs bcond

 libslirp.spec | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/libslirp.spec b/libslirp.spec
index 2d1bc26..4badd1b 100644
--- a/libslirp.spec
+++ b/libslirp.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	TCP/IP emulator used by virtual machine hypervisors to provide virtual networking services
 Summary(pl.UTF-8):	Emulator TCP/IP używany przez hipernadzorców maszyn wirtualnych do udostępniania wirtualnych usług sieciowych
 Name:		libslirp
@@ -58,7 +62,8 @@ Statyczna biblioteka SLIRP.
 %setup -q
 
 %build
-%meson build
+%meson build \
+	%{!?with_static_libs:--default-library=shared}
 
 %ninja_build -C build
 
@@ -85,6 +90,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/slirp
 %{_pkgconfigdir}/slirp.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libslirp.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libslirp.git/commitdiff/3f88561a66a47061a149ec436a4785f8826a71a5



More information about the pld-cvs-commit mailing list